home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / atarisy2.c < prev    next >
C/C++ Source or Header  |  2000-05-18  |  68KB  |  2,001 lines

  1. /***************************************************************************
  2.  
  3.     Atari System 2
  4.  
  5.     driver by Aaron Giles
  6.  
  7.     Games supported:
  8.         * Paperboy (1984)
  9.         * 720 Degrees (1986) [2 sets]
  10.         * Super Sprint (1986)
  11.         * Championship Sprint (1986)
  12.         * APB - All Points Bulletin (1987) [2 sets]
  13.  
  14.     Known bugs:
  15.         * none at this time
  16.  
  17. ****************************************************************************
  18.  
  19.     Memory map
  20.  
  21. ****************************************************************************
  22.  
  23.     ========================================================================
  24.     MAIN CPU
  25.     ========================================================================
  26.     0000-0FFF   R/W   xxxxxxxx xxxxxxxx   Program RAM
  27.     1000-107F   R/W   xxxxxxxx xxxxxxxx   Motion object palette RAM (64 entries)
  28.                 R/W   xxxx---- --------      (Intensity)
  29.                 R/W   ----xxxx --------      (Red)
  30.                 R/W   -------- xxxx----      (Green)
  31.                 R/W   -------- ----xxxx      (Blue)
  32.     1080-10BF   R/W   xxxxxxxx xxxxxxxx   Alphanumerics palette RAM (32 entries)
  33.     1100-11FF   R/W   xxxxxxxx xxxxxxxx   Playfield palette RAM (128 entries)
  34.     1400        R     -------- xxxxxxxx   ADC data read
  35.     1400          W   xxxxxx-- --------   Bank 1 ROM select
  36.     1402          W   xxxxxx-- --------   Bank 2 ROM select
  37.     1480-148F     W   -------- --------   ADC strobe/select
  38.     1580          W   -------- --------   Sound command read IRQ reset
  39.     15A0          W   -------- --------   Sound CPU reset
  40.     15C0          W   -------- --------   32V IRQ reset
  41.     15E0          W   -------- --------   VBLANK IRQ reset
  42.     1600          W   -------- ----xxxx   IRQ enable
  43.                   W   -------- ----x---      (VBLANK IRQ enable)
  44.                   W   -------- -----x--      (32V IRQ enable)
  45.                   W   -------- ------x-      (Sound response IRQ enable)
  46.                   W   -------- -------x      (Sound command read IRQ enable)
  47.     1680          W   -------- xxxxxxxx   Sound command
  48.     1700          W   xxxxxxxx xx--xxxx   Playfield X scroll/bank 1 select
  49.                   W   xxxxxxxx xx------      (Playfield X scroll)
  50.                   W   -------- ----xxxx      (Playfield bank 1 select)
  51.     1780          W   -xxxxxxx xx--xxxx   Playfield Y scroll/bank 2 select
  52.                   W   -xxxxxxx xx------      (Playfield Y scroll)
  53.                   W   -------- ----xxxx      (Playfield bank 2 select)
  54.     1800        R     x------- xxxxxxxx   Switch inputs
  55.                 R     x------- --------      (Test switch)
  56.                 R     -------- xx--xxxx      (Game-specific switches)
  57.                 R     -------- --x-----      (Sound command buffer full)
  58.                 R     -------- ---x----      (Sound response buffer full)
  59.     1800          W   -------- --------   Watchdog reset
  60.     1C00        R     -------- xxxxxxxx   Sound response read
  61.     2000-37FF   R/W   xxx---xx xxxxxxxx   Alphanumerics RAM (bank 0, 64x32 tiles)
  62.                 R/W   xxx----- --------      (Palette select)
  63.                 R/W   ------xx xxxxxxxx      (Tile index)
  64.     3800-3FFF   R/W   xxxxxxxx xxxxxxxx   Motion object RAM (bank 0, 256 entries x 4 words)
  65.                 R/W   xxxxxxxx xx------      (0: Y position)
  66.                 R/W   -------- -----xxx      (0: Tile index, 3 MSB)
  67.                 R/W   x------- --------      (1: Hold position from last object)
  68.                 R/W   -x------ --------      (1: Horizontal flip)
  69.                 R/W   --xxx--- --------      (1: Number of Y tiles - 1)
  70.                 R/W   -----xxx xxxxxxxx      (1: Tile index, 11 LSB)
  71.                 R/W   xxxxxxxx xx------      (2: X position)
  72.                 R/W   xx------ --------      (3: Priority)
  73.                 R/W   -xxx---- --------      (3: Palette select)
  74.                 R/W   -------- xxxxxxxx      (3: Link to the next object)
  75.     2000-3FFF   R/W   --xxxxxx xxxxxxxx   Playfield RAM (banks 2 & 3, 128x64 tiles)
  76.                 R/W   --xxx--- --------      (Palette select)
  77.                 R/W   -----x-- --------      (Tile bank select)
  78.                 R/W   ------xx xxxxxxxx      (Tile index, 10 LSB)
  79.     4000-5FFF   R     xxxxxxxx xxxxxxxx   Bank 1 ROM
  80.     6000-7FFF   R     xxxxxxxx xxxxxxxx   Bank 2 ROM
  81.     8000-FFFF   R     xxxxxxxx xxxxxxxx   Program ROM (slapstic mapped here as well)
  82.     ========================================================================
  83.     Interrupts:
  84.         IRQ0 = sound command read
  85.         IRQ1 = sound command write
  86.         IRQ2 = 32V
  87.         IRQ3 = VBLANK
  88.     ========================================================================
  89.  
  90.  
  91.     ========================================================================
  92.     SOUND CPU
  93.     ========================================================================
  94.     0000-0FFF   R/W   xxxxxxxx   Program RAM
  95.     1000-17FF   R/W   xxxxxxxx   EEPROM
  96.     1800-180F   R/W   xxxxxxxx   POKEY 1 (left) communications
  97.     1810-1813   R     xxxxxxxx   LETA analog inputs
  98.     1830-183F   R/W   xxxxxxxx   POKEY 2 (right) communications
  99.     1850-1851   R/W   xxxxxxxx   YM2151 communications
  100.     1860        R     xxxxxxxx   Sound command read
  101.     1870          W   xxxxxxxx   TMS5220 data latch
  102.     1872          W   --------   TMS5220 data strobe low
  103.     1873          W   --------   TMS5220 data strobe high
  104.     1874          W   xxxxxxxx   Sound response write
  105.     1876          W   ------xx   Coin counters
  106.     1878          W   --------   Interrupt acknowledge
  107.     187A          W   xxxxxxxx   Mixer control
  108.                   W   xxx-----      (TMS5220 volume)
  109.                   W   ---xx---      (POKEY volume)
  110.                   W   -----xxx      (YM2151 volume)
  111.     187C          W   --xxxx--   Misc. control bits
  112.                   W   --x-----      (TMS5220 frequency control)
  113.                   W   ---x----      (LETA resolution control)
  114.                   W   ----xx--      (LEDs)
  115.     187E          W   -------x   Sound enable
  116.     4000-FFFF   R     xxxxxxxx   Program ROM
  117.     ========================================================================
  118.     Interrupts:
  119.         IRQ = YM2151 interrupt
  120.         NMI = latch on sound command
  121.     ========================================================================
  122.  
  123. ****************************************************************************/
  124.  
  125. #include "driver.h"
  126. #include "cpu/t11/t11.h"
  127. #include "machine/atarigen.h"
  128. #include "vidhrdw/generic.h"
  129.  
  130.  
  131. extern UINT8 *atarisys2_slapstic;
  132.  
  133.  
  134. READ_HANDLER( atarisys2_slapstic_r );
  135. READ_HANDLER( atarisys2_videoram_r );
  136.  
  137. WRITE_HANDLER( atarisys2_slapstic_w );
  138. WRITE_HANDLER( atarisys2_vscroll_w );
  139. WRITE_HANDLER( atarisys2_hscroll_w );
  140. WRITE_HANDLER( atarisys2_videoram_w );
  141. WRITE_HANDLER( atarisys2_paletteram_w );
  142.  
  143. void atarisys2_scanline_update(int scanline);
  144.  
  145. int atarisys2_vh_start(void);
  146. void atarisys2_vh_stop(void);
  147. void atarisys2_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh);
  148.  
  149.  
  150.  
  151. static UINT8 *interrupt_enable;
  152. static UINT8 *bankselect;
  153.  
  154. static INT8 pedal_count;
  155.  
  156. static UINT8 has_tms5220;
  157. static UINT8 tms5220_data;
  158. static UINT8 tms5220_data_strobe;
  159.  
  160. static UINT8 which_adc;
  161.  
  162. static UINT8 p2portwr_state;
  163. static UINT8 p2portrd_state;
  164.  
  165.  
  166.  
  167. /*************************************
  168.  *
  169.  *    Interrupt updating
  170.  *
  171.  *************************************/
  172.  
  173. static void update_interrupts(void)
  174. {
  175.     if (atarigen_video_int_state)
  176.         cpu_set_irq_line(0, 3, ASSERT_LINE);
  177.     else
  178.         cpu_set_irq_line(0, 3, CLEAR_LINE);
  179.  
  180.     if (atarigen_scanline_int_state)
  181.         cpu_set_irq_line(0, 2, ASSERT_LINE);
  182.     else
  183.         cpu_set_irq_line(0, 2, CLEAR_LINE);
  184.  
  185.     if (p2portwr_state)
  186.         cpu_set_irq_line(0, 1, ASSERT_LINE);
  187.     else
  188.         cpu_set_irq_line(0, 1, CLEAR_LINE);
  189.  
  190.     if (p2portrd_state)
  191.         cpu_set_irq_line(0, 0, ASSERT_LINE);
  192.     else
  193.         cpu_set_irq_line(0, 0, CLEAR_LINE);
  194. }
  195.  
  196.  
  197.  
  198. /*************************************
  199.  *
  200.  *    Every 8-scanline update
  201.  *
  202.  *************************************/
  203.  
  204. static void scanline_update(int scanline)
  205. {
  206.     /* update the display list */
  207.     if (scanline < Machine->drv->screen_height)
  208.         atarisys2_scanline_update(scanline);
  209.  
  210.     if (scanline <= Machine->drv->screen_height)
  211.     {
  212.         /* generate the 32V interrupt (IRQ 2) */
  213.         if ((scanline % 64) == 0)
  214.             if (READ_WORD(&interrupt_enable[0]) & 4)
  215.                 atarigen_scanline_int_gen();
  216.     }
  217. }
  218.  
  219.  
  220.  
  221. /*************************************
  222.  *
  223.  *    Initialization
  224.  *
  225.  *************************************/
  226.  
  227. static void init_machine(void)
  228. {
  229.     atarigen_eeprom_reset();
  230.     slapstic_reset();
  231.     atarigen_interrupt_reset(update_interrupts);
  232.     atarigen_scanline_timer_reset(scanline_update, 8);
  233.     atarigen_sound_io_reset(1);
  234.  
  235.     tms5220_data_strobe = 1;
  236.  
  237.     p2portwr_state = 0;
  238.     p2portrd_state = 0;
  239.  
  240.     which_adc = 0;
  241. }
  242.  
  243.  
  244.  
  245. /*************************************
  246.  *
  247.  *    Interrupt handlers
  248.  *
  249.  *************************************/
  250.  
  251. static int vblank_interrupt(void)
  252. {
  253.     /* clock the VBLANK through */
  254.     if (READ_WORD(&interrupt_enable[0]) & 8)
  255.         atarigen_video_int_gen();
  256.  
  257.     return 0;
  258. }
  259.  
  260.  
  261. static WRITE_HANDLER( interrupt_ack_w )
  262. {
  263.     switch (offset & 0x60)
  264.     {
  265.         /* reset sound IRQ */
  266.         case 0x00:
  267.             if (offset == 0x00)
  268.             {
  269.                 p2portrd_state = 0;
  270.                 atarigen_update_interrupts();
  271.             }
  272.             break;
  273.  
  274.         /* reset sound CPU */
  275.         case 0x20:
  276.             if (!(data & 0xff000000))
  277.                 cpu_set_reset_line(1,ASSERT_LINE);
  278.             if (!(data & 0x00ff0000))
  279.                 cpu_set_reset_line(1,CLEAR_LINE);
  280.             break;
  281.  
  282.         /* reset 32V IRQ */
  283.         case 0x40:
  284.             atarigen_scanline_int_ack_w(0, 0);
  285.             break;
  286.  
  287.         /* reset VBLANK IRQ */
  288.         case 0x60:
  289.             atarigen_video_int_ack_w(0, 0);
  290.             break;
  291.     }
  292. }
  293.  
  294.  
  295.  
  296. /*************************************
  297.  *
  298.  *    Bank selection.
  299.  *
  300.  *************************************/
  301.  
  302. static WRITE_HANDLER( bankselect_w )
  303. {
  304.     static int bankoffset[64] =
  305.     {
  306.         0x28000, 0x20000, 0x18000, 0x10000,
  307.         0x2a000, 0x22000, 0x1a000, 0x12000,
  308.         0x2c000, 0x24000, 0x1c000, 0x14000,
  309.         0x2e000, 0x26000, 0x1e000, 0x16000,
  310.         0x48000, 0x40000, 0x38000, 0x30000,
  311.         0x4a000, 0x42000, 0x3a000, 0x32000,
  312.         0x4c000, 0x44000, 0x3c000, 0x34000,
  313.         0x4e000, 0x46000, 0x3e000, 0x36000,
  314.         0x68000, 0x60000, 0x58000, 0x50000,
  315.         0x6a000, 0x62000, 0x5a000, 0x52000,
  316.         0x6c000, 0x64000, 0x5c000, 0x54000,
  317.         0x6e000, 0x66000, 0x5e000, 0x56000,
  318.         0x88000, 0x80000, 0x78000, 0x70000,
  319.         0x8a000, 0x82000, 0x7a000, 0x72000,
  320.         0x8c000, 0x84000, 0x7c000, 0x74000,
  321.         0x8e000, 0x86000, 0x7e000, 0x76000
  322.     };
  323.  
  324.     int oldword = READ_WORD(&bankselect[offset]);
  325.     int newword = COMBINE_WORD(oldword, data);
  326.     UINT8 *RAM = memory_region(REGION_CPU1);
  327.     UINT8 *base = &RAM[bankoffset[(newword >> 10) & 0x3f]];
  328.  
  329.     WRITE_WORD(&bankselect[offset], newword);
  330.     if (offset == 0)
  331.     {
  332.         cpu_setbank(1, base);
  333.         t11_SetBank(0x4000, base);
  334.     }
  335.     else if (offset == 2)
  336.     {
  337.         cpu_setbank(2, base);
  338.         t11_SetBank(0x6000, base);
  339.     }
  340. }
  341.  
  342.  
  343.  
  344. /*************************************
  345.  *
  346.  *    I/O read dispatch.
  347.  *
  348.  *************************************/
  349.  
  350. static READ_HANDLER( switch_r )
  351. {
  352.     int result = input_port_1_r(offset) | (input_port_2_r(offset) << 8);
  353.  
  354.     if (atarigen_cpu_to_sound_ready) result ^= 0x20;
  355.     if (atarigen_sound_to_cpu_ready) result ^= 0x10;
  356.  
  357.     return result;
  358. }
  359.  
  360.  
  361. static READ_HANDLER( switch_6502_r )
  362. {
  363.     int result = input_port_0_r(offset);
  364.  
  365.     if (atarigen_cpu_to_sound_ready) result ^= 0x01;
  366.     if (atarigen_sound_to_cpu_ready) result ^= 0x02;
  367.     if (!has_tms5220 || tms5220_ready_r()) result ^= 0x04;
  368.     if (!(input_port_2_r(offset) & 0x80)) result ^= 0x10;
  369.  
  370.     return result;
  371. }
  372.  
  373.  
  374. static WRITE_HANDLER( switch_6502_w )
  375. {
  376.     (void)offset;
  377.  
  378.     if (has_tms5220)
  379.     {
  380.         data = 12 | ((data >> 5) & 1);
  381.         tms5220_set_frequency(ATARI_CLOCK_20MHz/4 / (16 - data) / 2);
  382.     }
  383. }
  384.  
  385.  
  386.  
  387. /*************************************
  388.  *
  389.  *    Controls read
  390.  *
  391.  *************************************/
  392.  
  393. static WRITE_HANDLER( adc_strobe_w )
  394. {
  395.     (void)data;
  396.     which_adc = (offset / 2) & 3;
  397. }
  398.  
  399.  
  400. static READ_HANDLER( adc_r )
  401. {
  402.     (void)offset;
  403.  
  404.     if (which_adc < pedal_count)
  405.         return ~readinputport(3 + which_adc);
  406.  
  407.     return readinputport(3 + which_adc) | 0xff00;
  408. }
  409.  
  410.  
  411. static READ_HANDLER( leta_r )
  412. {
  413.     if (pedal_count == -1)   /* 720 */
  414.     {
  415.         switch (offset & 3)
  416.         {
  417.             case 0: return readinputport(7) >> 8;
  418.             case 1: return readinputport(7) & 0xff;
  419.             case 2: return 0xff;
  420.             case 3: return 0xff;
  421.         }
  422.     }
  423.  
  424.     return readinputport(7 + (offset & 3));
  425. }
  426.  
  427.  
  428.  
  429. /*************************************
  430.  *
  431.  *    Global sound control
  432.  *
  433.  *************************************/
  434.  
  435. static WRITE_HANDLER( mixer_w )
  436. {
  437.     (void)offset;
  438.  
  439.     atarigen_set_ym2151_vol((data & 7) * 100 / 7);
  440.     atarigen_set_pokey_vol(((data >> 3) & 3) * 100 / 3);
  441.     atarigen_set_tms5220_vol(((data >> 5) & 7) * 100 / 7);
  442. }
  443.  
  444.  
  445. static WRITE_HANDLER( sound_enable_w )
  446. {
  447.     (void)offset;
  448.     (void)data;
  449. }
  450.  
  451.  
  452. static READ_HANDLER( sound_r )
  453. {
  454.     /* clear the p2portwr state on a p1portrd */
  455.     p2portwr_state = 0;
  456.     atarigen_update_interrupts();
  457.  
  458.     /* handle it normally otherwise */
  459.     return atarigen_sound_r(offset);
  460. }
  461.  
  462.  
  463. static WRITE_HANDLER( sound_6502_w )
  464. {
  465.     /* clock the state through */
  466.     p2portwr_state = (READ_WORD(&interrupt_enable[0]) & 2) != 0;
  467.     atarigen_update_interrupts();
  468.  
  469.     /* handle it normally otherwise */
  470.     atarigen_6502_sound_w(offset, data);
  471. }
  472.  
  473.  
  474. static READ_HANDLER( sound_6502_r )
  475. {
  476.     /* clock the state through */
  477.     p2portrd_state = (READ_WORD(&interrupt_enable[0]) & 1) != 0;
  478.     atarigen_update_interrupts();
  479.  
  480.     /* handle it normally otherwise */
  481.     return atarigen_6502_sound_r(offset);
  482. }
  483.  
  484.  
  485. /*************************************
  486.  *
  487.  *    Speech chip
  488.  *
  489.  *************************************/
  490.  
  491. static WRITE_HANDLER( tms5220_w )
  492. {
  493.     (void)offset;
  494.     tms5220_data = data;
  495. }
  496.  
  497.  
  498. static WRITE_HANDLER( tms5220_strobe_w )
  499. {
  500.     (void)data;
  501.  
  502.     if (!(offset & 1) && tms5220_data_strobe)
  503.         if (has_tms5220)
  504.             tms5220_data_w(0, tms5220_data);
  505.     tms5220_data_strobe = offset & 1;
  506. }
  507.  
  508.  
  509.  
  510. /*************************************
  511.  *
  512.  *    Main CPU memory handlers
  513.  *
  514.  *************************************/
  515.  
  516. static struct MemoryReadAddress main_readmem[] =
  517. {
  518.     { 0x0000, 0x0fff, MRA_RAM },
  519.     { 0x1000, 0x11ff, paletteram_word_r },
  520.     { 0x1400, 0x1403, adc_r },
  521.     { 0x1800, 0x1801, switch_r },
  522.     { 0x1c00, 0x1c01, sound_r },
  523.     { 0x2000, 0x3fff, atarisys2_videoram_r },
  524.     { 0x4000, 0x5fff, MRA_BANK1 },
  525.     { 0x6000, 0x7fff, MRA_BANK2 },
  526.     { 0x8000, 0x81ff, atarisys2_slapstic_r },
  527.     { 0x8200, 0xffff, MRA_ROM },
  528.     { -1 }  /* end of table */
  529. };
  530.  
  531.  
  532. static struct MemoryWriteAddress main_writemem[] =
  533. {
  534.     { 0x0000, 0x0fff, MWA_RAM },
  535.     { 0x1000, 0x11ff, atarisys2_paletteram_w, &paletteram },
  536.     { 0x1400, 0x1403, bankselect_w, &bankselect },
  537.     { 0x1480, 0x148f, adc_strobe_w },
  538.     { 0x1580, 0x15ff, interrupt_ack_w },
  539.     { 0x1600, 0x1601, MWA_RAM, &interrupt_enable },
  540.     { 0x1680, 0x1681, atarigen_sound_w },
  541.     { 0x1700, 0x1701, atarisys2_hscroll_w, &atarigen_hscroll },
  542.     { 0x1780, 0x1781, atarisys2_vscroll_w, &atarigen_vscroll },
  543.     { 0x1800, 0x1801, watchdog_reset_w },
  544.     { 0x2000, 0x3fff, atarisys2_videoram_w },
  545.     { 0x4000, 0x7fff, MWA_ROM },
  546.     { 0x8000, 0x81ff, atarisys2_slapstic_w, &atarisys2_slapstic },
  547.     { 0x8200, 0xffff, MWA_ROM },
  548.     { -1 }  /* end of table */
  549. };
  550.  
  551.  
  552.  
  553. /*************************************
  554.  *
  555.  *    Sound CPU memory handlers
  556.  *
  557.  *************************************/
  558.  
  559. static struct MemoryReadAddress sound_readmem[] =
  560. {
  561.     { 0x0000, 0x0fff, MRA_RAM },
  562.     { 0x1000, 0x17ff, MRA_RAM },
  563.     { 0x1800, 0x180f, pokey1_r },
  564.     { 0x1810, 0x1813, leta_r },
  565.     { 0x1830, 0x183f, pokey2_r },
  566.     { 0x1840, 0x1840, switch_6502_r },
  567.     { 0x1850, 0x1851, YM2151_status_port_0_r },
  568.     { 0x1860, 0x1860, sound_6502_r },
  569.     { 0x4000, 0xffff, MRA_ROM },
  570.     { -1 }  /* end of table */
  571. };
  572.  
  573.  
  574. static struct MemoryWriteAddress sound_writemem[] =
  575. {
  576.     { 0x0000, 0x0fff, MWA_RAM },
  577.     { 0x1000, 0x17ff, MWA_RAM, &atarigen_eeprom, &atarigen_eeprom_size },
  578.     { 0x1800, 0x180f, pokey1_w },
  579.     { 0x1830, 0x183f, pokey2_w },
  580.     { 0x1850, 0x1850, YM2151_register_port_0_w },
  581.     { 0x1851, 0x1851, YM2151_data_port_0_w },
  582.     { 0x1870, 0x1870, tms5220_w },
  583.     { 0x1872, 0x1873, tms5220_strobe_w },
  584.     { 0x1874, 0x1874, sound_6502_w },
  585.     { 0x1876, 0x1876, MWA_NOP },
  586.     { 0x1878, 0x1878, atarigen_6502_irq_ack_w },
  587.     { 0x187a, 0x187a, mixer_w },
  588.     { 0x187c, 0x187c, switch_6502_w },
  589.     { 0x187e, 0x187e, sound_enable_w },
  590.     { 0x4000, 0xffff, MWA_ROM },
  591.     { -1 }  /* end of table */
  592. };
  593.  
  594.  
  595.  
  596. /*************************************
  597.  *
  598.  *    Port definitions
  599.  *
  600.  *************************************/
  601.  
  602. INPUT_PORTS_START( paperboy )
  603.     PORT_START    /* 1840 (sound) */
  604.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL )
  605.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL )
  606.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL )
  607.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
  608.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SPECIAL )
  609.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 )
  610.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
  611.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
  612.  
  613.     PORT_START    /* 1800 */
  614.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
  615.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
  616.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  617.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  618.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL )
  619.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL )
  620.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
  621.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
  622.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
  623.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  624.  
  625.     PORT_START    /* 1801 */
  626.     PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED )
  627.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  628.  
  629.     PORT_START    /* ADC0 */
  630.     PORT_ANALOG( 0xff, 0x80, IPT_AD_STICK_X | IPF_PLAYER1, 100, 10, 0x10, 0xf0 )
  631.  
  632.     PORT_START    /* ADC1 */
  633.     PORT_ANALOG( 0xff, 0x80, IPT_AD_STICK_Y | IPF_PLAYER1, 100, 10, 0x10, 0xf0 )
  634.  
  635.     PORT_START    /* ADC2 */
  636.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  637.  
  638.     PORT_START    /* ADC3 */
  639.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  640.  
  641.     PORT_START    /* LETA0 */
  642.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  643.  
  644.     PORT_START    /* LETA1 */
  645.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  646.  
  647.     PORT_START    /* LETA2 */
  648.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  649.  
  650.     PORT_START    /* LETA3 */
  651.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  652.  
  653.     PORT_START    /* DSW0 */
  654.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) )
  655.     PORT_DIPSETTING(    0x03, DEF_STR( 4C_1C ) )
  656.     PORT_DIPSETTING(    0x02, DEF_STR( 3C_1C ) )
  657.     PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
  658.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  659.     PORT_DIPNAME( 0x0c, 0x00, "Right Coin" )
  660.     PORT_DIPSETTING(    0x00, "*1" )
  661.     PORT_DIPSETTING(    0x04, "*4" )
  662.     PORT_DIPSETTING(    0x08, "*5" )
  663.     PORT_DIPSETTING(    0x0c, "*6" )
  664.     PORT_DIPNAME( 0x10, 0x00, "Left Coin" )
  665.     PORT_DIPSETTING(    0x00, "*1" )
  666.     PORT_DIPSETTING(    0x10, "*2" )
  667.     PORT_DIPNAME( 0xe0, 0x00, "Bonus Coins" )
  668.     PORT_DIPSETTING(    0x00, "None" )
  669.     PORT_DIPSETTING(    0x80, "1 each 5" )
  670.     PORT_DIPSETTING(    0x40, "1 each 4" )
  671.     PORT_DIPSETTING(    0xa0, "1 each 3" )
  672.     PORT_DIPSETTING(    0x60, "2 each 4" )
  673.     PORT_DIPSETTING(    0x20, "1 each 2" )
  674.     PORT_DIPSETTING(    0xc0, "1 each ?" )
  675.     PORT_DIPSETTING(    0xe0, DEF_STR( Free_Play ) )
  676.  
  677.     PORT_START    /* DSW1 */
  678.     PORT_DIPNAME( 0x03, 0x01, DEF_STR( Difficulty ) )
  679.     PORT_DIPSETTING(    0x01, "Easy" )
  680.     PORT_DIPSETTING(    0x02, "Medium" )
  681.     PORT_DIPSETTING(    0x00, "Med. Hard" )
  682.     PORT_DIPSETTING(    0x03, "Hard" )
  683.     PORT_DIPNAME( 0x0c, 0x08, DEF_STR( Bonus_Life ) )
  684.     PORT_DIPSETTING(    0x08, "10000" )
  685.     PORT_DIPSETTING(    0x00, "15000" )
  686.     PORT_DIPSETTING(    0x0c, "20000" )
  687.     PORT_DIPSETTING(    0x04, "None" )
  688.     PORT_DIPNAME( 0x30, 0x20, DEF_STR( Lives ) )
  689.     PORT_DIPSETTING(    0x20, "3" )
  690.     PORT_DIPSETTING(    0x00, "4" )
  691.     PORT_DIPSETTING(    0x30, "5" )
  692.     PORT_BITX( 0,       0x10, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Infinite", IP_KEY_NONE, IP_JOY_NONE )
  693.     PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
  694.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  695.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  696.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
  697.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  698.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  699. INPUT_PORTS_END
  700.  
  701.  
  702. INPUT_PORTS_START( 720 )
  703.     PORT_START    /* 1840 (sound) */
  704.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL )
  705.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL )
  706.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL )
  707.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
  708.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SPECIAL )
  709.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 )
  710.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
  711.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
  712.  
  713.     PORT_START    /* 1800 */
  714.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
  715.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
  716.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  717.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  718.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL )
  719.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL )
  720.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
  721.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
  722.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
  723.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  724.  
  725.     PORT_START    /* 1801 */
  726.     PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED )
  727.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  728.  
  729.     PORT_START    /* ADC0 */
  730.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  731.  
  732.     PORT_START    /* ADC1 */
  733.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  734.  
  735.     PORT_START    /* ADC2 */
  736.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  737.  
  738.     PORT_START    /* ADC3 */
  739.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  740.  
  741.     PORT_START    /* LETA0/1 */
  742.     PORT_ANALOG( 0xffff, 0x0000, IPT_DIAL | IPF_PLAYER1, 30, 10, 0, 0 )
  743.  
  744.     PORT_START    /* filler */
  745.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  746.  
  747.     PORT_START    /* LETA2 */
  748.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  749.  
  750.     PORT_START    /* LETA3 */
  751.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  752.  
  753.     PORT_START    /* DSW0 */
  754.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) )
  755.     PORT_DIPSETTING(    0x03, DEF_STR( 4C_1C ) )
  756.     PORT_DIPSETTING(    0x02, DEF_STR( 3C_1C ) )
  757.     PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
  758.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  759.     PORT_DIPNAME( 0x0c, 0x00, "Right Coin" )
  760.     PORT_DIPSETTING(    0x00, "*1" )
  761.     PORT_DIPSETTING(    0x04, "*4" )
  762.     PORT_DIPSETTING(    0x08, "*5" )
  763.     PORT_DIPSETTING(    0x0c, "*6" )
  764.     PORT_DIPNAME( 0x10, 0x00, "Left Coin" )
  765.     PORT_DIPSETTING(    0x00, "*1" )
  766.     PORT_DIPSETTING(    0x10, "*2" )
  767.     PORT_DIPNAME( 0xe0, 0x00, "Bonus Coins" )
  768.     PORT_DIPSETTING(    0x00, "None" )
  769. /*    PORT_DIPSETTING(    0xc0, "None" )*/
  770.     PORT_DIPSETTING(    0x80, "1 each 5" )
  771.     PORT_DIPSETTING(    0x40, "1 each 4" )
  772.     PORT_DIPSETTING(    0xa0, "1 each 3" )
  773.     PORT_DIPSETTING(    0x60, "2 each 4" )
  774.     PORT_DIPSETTING(    0x20, "1 each 2" )
  775.     PORT_DIPSETTING(    0xe0, DEF_STR( Free_Play ) )
  776.  
  777.     PORT_START    /* DSW1 */
  778.     PORT_DIPNAME( 0x03, 0x01, DEF_STR( Bonus_Life ) )
  779.     PORT_DIPSETTING(    0x01, "3000" )
  780.     PORT_DIPSETTING(    0x00, "5000" )
  781.     PORT_DIPSETTING(    0x02, "8000" )
  782.     PORT_DIPSETTING(    0x03, "12000" )
  783.     PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Difficulty ) )
  784.     PORT_DIPSETTING(    0x04, "Easy" )
  785.     PORT_DIPSETTING(    0x00, "Medium" )
  786.     PORT_DIPSETTING(    0x08, "Hard" )
  787.     PORT_DIPSETTING(    0x0c, "Hardest" )
  788.     PORT_DIPNAME( 0x30, 0x10, "Maximum Add. A. Coins" )
  789.     PORT_DIPSETTING(    0x10, "0" )
  790.     PORT_DIPSETTING(    0x20, "1" )
  791.     PORT_DIPSETTING(    0x00, "2" )
  792.     PORT_DIPSETTING(    0x30, "3" )
  793.     PORT_DIPNAME( 0xc0, 0x40, "Coins Required" )
  794.     PORT_DIPSETTING(    0x80, "3 to Start, 2 to Continue" )
  795.     PORT_DIPSETTING(    0xc0, "3 to Start, 1 to Continue" )
  796.     PORT_DIPSETTING(    0x00, "2 to Start, 1 to Continue" )
  797.     PORT_DIPSETTING(    0x40, "1 to Start, 1 to Continue" )
  798. INPUT_PORTS_END
  799.  
  800.  
  801. INPUT_PORTS_START( ssprint )
  802.     PORT_START    /* 1840 (sound) */
  803.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL )
  804.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL )
  805.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL )
  806.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
  807.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SPECIAL )
  808.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
  809.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
  810.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 )
  811.  
  812.     PORT_START    /* 1800 */
  813.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
  814.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
  815.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
  816.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START3 )
  817.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL )
  818.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL )
  819.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
  820.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  821.  
  822.     PORT_START    /* 1801 */
  823.     PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED )
  824.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  825.  
  826.     PORT_START    /* ADC0 */
  827.     PORT_ANALOG( 0xff, 0x00, IPT_PEDAL | IPF_PLAYER1, 100, 4, 0x00, 0x3f )
  828.  
  829.     PORT_START    /* ADC1 */
  830.     PORT_ANALOG( 0xff, 0x00, IPT_PEDAL | IPF_PLAYER2, 100, 4, 0x00, 0x3f )
  831.  
  832.     PORT_START    /* ADC2 */
  833.     PORT_ANALOG( 0xff, 0x00, IPT_PEDAL | IPF_PLAYER3, 100, 4, 0x00, 0x3f )
  834.  
  835.     PORT_START    /* ADC3 */
  836.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  837.  
  838.     PORT_START    /* LETA0 */
  839.     PORT_ANALOG( 0xff, 0x40, IPT_DIAL | IPF_PLAYER1, 25, 10, 0x00, 0x7f )
  840.  
  841.     PORT_START    /* LETA1 */
  842.     PORT_ANALOG( 0xff, 0x40, IPT_DIAL | IPF_PLAYER2, 25, 10, 0x00, 0x7f )
  843.  
  844.     PORT_START    /* LETA2 */
  845.     PORT_ANALOG( 0xff, 0x40, IPT_DIAL | IPF_PLAYER3, 25, 10, 0x00, 0x7f )
  846.  
  847.     PORT_START    /* LETA3 */
  848.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  849.  
  850.     PORT_START    /* DSW0 */
  851.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) )
  852.     PORT_DIPSETTING(    0x03, DEF_STR( 4C_1C ) )
  853.     PORT_DIPSETTING(    0x02, DEF_STR( 3C_1C ) )
  854.     PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
  855.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  856.     PORT_DIPNAME( 0x1c, 0x00, "Coin Multiplier" )
  857.     PORT_DIPSETTING(    0x00, "*1" )
  858.     PORT_DIPSETTING(    0x04, "*2" )
  859.     PORT_DIPSETTING(    0x08, "*3" )
  860.     PORT_DIPSETTING(    0x0c, "*4" )
  861.     PORT_DIPSETTING(    0x10, "*5" )
  862.     PORT_DIPSETTING(    0x14, "*6" )
  863.     PORT_DIPSETTING(    0x18, "*7" )
  864.     PORT_DIPSETTING(    0x1c, "*8" )
  865.     PORT_DIPNAME( 0xe0, 0x00, "Bonus Coins" )
  866.     PORT_DIPSETTING(    0x00, "None" )
  867.     PORT_DIPSETTING(    0x80, "1 each 5" )
  868.     PORT_DIPSETTING(    0x40, "1 each 4" )
  869.     PORT_DIPSETTING(    0xa0, "1 each 3" )
  870.     PORT_DIPSETTING(    0x60, "2 each 4" )
  871.     PORT_DIPSETTING(    0x20, "1 each 2" )
  872.     PORT_DIPSETTING(    0xc0, "1 each ?" )
  873.     PORT_DIPSETTING(    0xe0, DEF_STR( Free_Play ) )
  874.  
  875.     PORT_START    /* DSW1 */
  876.     PORT_DIPNAME( 0x03, 0x01, DEF_STR( Difficulty ) )
  877.     PORT_DIPSETTING(    0x01, "Easy" )
  878.     PORT_DIPSETTING(    0x00, "Medium" )
  879.     PORT_DIPSETTING(    0x02, "Med. Hard" )
  880.     PORT_DIPSETTING(    0x03, "Hard" )
  881.     PORT_DIPNAME( 0x0c, 0x04, "Obstacles" )
  882.     PORT_DIPSETTING(    0x04, "Easy" )
  883.     PORT_DIPSETTING(    0x00, "Medium" )
  884.     PORT_DIPSETTING(    0x08, "Med. Hard" )
  885.     PORT_DIPSETTING(    0x0c, "Hard" )
  886.     PORT_DIPNAME( 0x30, 0x00, "Wrenches" )
  887.     PORT_DIPSETTING(    0x10, "2" )
  888.     PORT_DIPSETTING(    0x00, "3" )
  889.     PORT_DIPSETTING(    0x20, "4" )
  890.     PORT_DIPSETTING(    0x30, "5" )
  891.     PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
  892.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  893.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  894.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
  895.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  896.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  897. INPUT_PORTS_END
  898.  
  899.  
  900. INPUT_PORTS_START( csprint )
  901.     PORT_START    /* 1840 (sound) */
  902.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL )
  903.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL )
  904.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL )
  905.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
  906.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SPECIAL )
  907.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
  908.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
  909.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
  910.  
  911.     PORT_START    /* 1800 */
  912.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
  913.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
  914.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  915.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
  916.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL )
  917.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL )
  918.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
  919.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  920.  
  921.     PORT_START    /* 1801 */
  922.     PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED )
  923.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  924.  
  925.     PORT_START    /* ADC0 */
  926.     PORT_ANALOG( 0xff, 0x00, IPT_PEDAL | IPF_PLAYER1, 100, 4, 0x00, 0x3f )
  927.  
  928.     PORT_START    /* ADC1 */
  929.     PORT_ANALOG( 0xff, 0x00, IPT_PEDAL | IPF_PLAYER2, 100, 4, 0x00, 0x3f )
  930.  
  931.     PORT_START    /* ADC2 */
  932.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  933.  
  934.     PORT_START    /* ADC3 */
  935.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  936.  
  937.     PORT_START    /* LETA0 */
  938.     PORT_ANALOG( 0xff, 0x40, IPT_DIAL | IPF_PLAYER1, 25, 10, 0x00, 0x7f )
  939.  
  940.     PORT_START    /* LETA1 */
  941.     PORT_ANALOG( 0xff, 0x40, IPT_DIAL | IPF_PLAYER2, 25, 10, 0x00, 0x7f )
  942.  
  943.     PORT_START    /* LETA2 */
  944.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  945.  
  946.     PORT_START    /* LETA3 */
  947.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  948.  
  949.     PORT_START    /* DSW0 */
  950.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) )
  951.     PORT_DIPSETTING(    0x03, DEF_STR( 4C_1C ) )
  952.     PORT_DIPSETTING(    0x02, DEF_STR( 3C_1C ) )
  953.     PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
  954.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  955.     PORT_DIPNAME( 0x1c, 0x00, "Coin Multiplier" )
  956.     PORT_DIPSETTING(    0x00, "*1" )
  957.     PORT_DIPSETTING(    0x04, "*2" )
  958.     PORT_DIPSETTING(    0x08, "*3" )
  959.     PORT_DIPSETTING(    0x0c, "*4" )
  960.     PORT_DIPSETTING(    0x10, "*5" )
  961.     PORT_DIPSETTING(    0x14, "*6" )
  962.     PORT_DIPSETTING(    0x18, "*7" )
  963.     PORT_DIPSETTING(    0x1c, "*8" )
  964.     PORT_DIPNAME( 0xe0, 0x00, "Bonus Coins" )
  965.     PORT_DIPSETTING(    0x00, "None" )
  966.     PORT_DIPSETTING(    0x80, "1 each 5" )
  967.     PORT_DIPSETTING(    0x40, "1 each 4" )
  968.     PORT_DIPSETTING(    0xa0, "1 each 3" )
  969.     PORT_DIPSETTING(    0x60, "2 each 4" )
  970.     PORT_DIPSETTING(    0x20, "1 each 2" )
  971.     PORT_DIPSETTING(    0xc0, "1 each ?" )
  972.     PORT_DIPSETTING(    0xe0, DEF_STR( Free_Play ) )
  973.  
  974.     PORT_START    /* DSW1 */
  975.     PORT_DIPNAME( 0x03, 0x01, DEF_STR( Difficulty ) )
  976.     PORT_DIPSETTING(    0x01, "Easy" )
  977.     PORT_DIPSETTING(    0x00, "Medium" )
  978.     PORT_DIPSETTING(    0x02, "Med. Hard" )
  979.     PORT_DIPSETTING(    0x03, "Hard" )
  980.     PORT_DIPNAME( 0x0c, 0x04, "Obstacles" )
  981.     PORT_DIPSETTING(    0x04, "Easy" )
  982.     PORT_DIPSETTING(    0x00, "Medium" )
  983.     PORT_DIPSETTING(    0x08, "Med. Hard" )
  984.     PORT_DIPSETTING(    0x0c, "Hard" )
  985.     PORT_DIPNAME( 0x30, 0x00, "Wrenches" )
  986.     PORT_DIPSETTING(    0x10, "2" )
  987.     PORT_DIPSETTING(    0x00, "3" )
  988.     PORT_DIPSETTING(    0x20, "4" )
  989.     PORT_DIPSETTING(    0x30, "5" )
  990.     PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
  991.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  992.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  993.     PORT_DIPNAME( 0x80, 0x80, "Auto High Score Reset" )
  994.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  995.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  996. INPUT_PORTS_END
  997.  
  998.  
  999. INPUT_PORTS_START( apb )
  1000.     PORT_START    /* 1840 (sound) */
  1001.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL )
  1002.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL )
  1003.     PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_SPECIAL )
  1004.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
  1005.     PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_SPECIAL )
  1006.     PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_COIN3  )
  1007.     PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_COIN2  )
  1008.     PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_COIN1  )
  1009.  
  1010.     PORT_START    /* 1800 */
  1011.     PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_UNUSED )
  1012.     PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_BUTTON2 | IPF_PLAYER1 )
  1013.     PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_UNUSED )
  1014.     PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_BUTTON3 | IPF_PLAYER1 )
  1015.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL )
  1016.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL )
  1017.     PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_UNUSED )
  1018.     PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_UNUSED )
  1019.  
  1020.     PORT_START    /* 1801 */
  1021.     PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED )
  1022.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  1023.  
  1024.     PORT_START    /* ADC0 */
  1025.     PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
  1026.  
  1027.     PORT_START    /* ADC1 */
  1028.     PORT_ANALOG( 0xff, 0x00, IPT_PEDAL | IPF_PLAYER1, 100, 4, 0x00, 0x3f )
  1029.  
  1030.     PORT_START    /* ADC2 */
  1031.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  1032.  
  1033.     PORT_START    /* ADC3 */
  1034.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  1035.  
  1036.     PORT_START    /* LETA0 */
  1037.     PORT_ANALOG( 0xff, 0x40, IPT_DIAL | IPF_PLAYER1, 25, 10, 0x00, 0x7f )
  1038.  
  1039.     PORT_START    /* LETA1 */
  1040.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  1041.  
  1042.     PORT_START    /* LETA2 */
  1043.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  1044.  
  1045.     PORT_START    /* LETA3 */
  1046.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  1047.  
  1048.     PORT_START    /* DSW0 */
  1049.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) )
  1050.     PORT_DIPSETTING(    0x03, DEF_STR( 4C_1C ) )
  1051.     PORT_DIPSETTING(    0x02, DEF_STR( 3C_1C ) )
  1052.     PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
  1053.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  1054.     PORT_DIPNAME( 0x0c, 0x00, "Right Coin" )
  1055.     PORT_DIPSETTING(    0x00, "*1" )
  1056.     PORT_DIPSETTING(    0x04, "*4" )
  1057.     PORT_DIPSETTING(    0x08, "*5" )
  1058.     PORT_DIPSETTING(    0x0c, "*6" )
  1059.     PORT_DIPNAME( 0x10, 0x00, "Left Coin" )
  1060.     PORT_DIPSETTING(    0x00, "*1" )
  1061.     PORT_DIPSETTING(    0x10, "*2" )
  1062.     PORT_DIPNAME( 0xe0, 0x00, "Bonus Coins" )
  1063.     PORT_DIPSETTING(    0x00, "None" )
  1064.     PORT_DIPSETTING(    0xc0, "1 each 6" )
  1065.     PORT_DIPSETTING(    0xa0, "1 each 5" )
  1066.     PORT_DIPSETTING(    0x80, "1 each 4" )
  1067.     PORT_DIPSETTING(    0x60, "1 each 3" )
  1068.     PORT_DIPSETTING(    0x40, "1 each 2" )
  1069.     PORT_DIPSETTING(    0x20, "1 each 1" )
  1070.     PORT_DIPSETTING(    0xe0, DEF_STR( Free_Play ) )
  1071.  
  1072.     PORT_START    /* DSW1 */
  1073.     PORT_DIPNAME( 0x01, 0x01, "Attract Lights" )
  1074.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  1075.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1076.     PORT_DIPNAME( 0x06, 0x06, "Max Continues" )
  1077.     PORT_DIPSETTING(    0x02, "3" )
  1078.     PORT_DIPSETTING(    0x04, "10" )
  1079.     PORT_DIPSETTING(    0x00, "25" )
  1080.     PORT_DIPSETTING(    0x06, "199" )
  1081.     PORT_DIPNAME( 0x38, 0x38, DEF_STR( Difficulty ) )
  1082.     PORT_DIPSETTING(    0x38, "1 (Easy)" )
  1083.     PORT_DIPSETTING(    0x30, "2" )
  1084.     PORT_DIPSETTING(    0x28, "3" )
  1085.     PORT_DIPSETTING(    0x00, "4" )
  1086.     PORT_DIPSETTING(    0x20, "5" )
  1087.     PORT_DIPSETTING(    0x10, "6" )
  1088.     PORT_DIPSETTING(    0x08, "7" )
  1089.     PORT_DIPSETTING(    0x18, "8 (Hard)" )
  1090.     PORT_DIPNAME( 0xc0, 0x40, "Coins Required" )
  1091.     PORT_DIPSETTING(    0x80, "3 to Start, 2 to Continue" )
  1092.     PORT_DIPSETTING(    0xc0, "3 to Start, 1 to Continue" )
  1093.     PORT_DIPSETTING(    0x00, "2 to Start, 1 to Continue" )
  1094.     PORT_DIPSETTING(    0x40, "1 to Start, 1 to Continue" )
  1095. INPUT_PORTS_END
  1096.  
  1097.  
  1098.  
  1099. /*************************************
  1100.  *
  1101.  *    Graphics definitions
  1102.  *
  1103.  *************************************/
  1104.  
  1105. static struct GfxLayout anlayout =
  1106. {
  1107.     8,8,
  1108.     RGN_FRAC(1,1),
  1109.     2,
  1110.     { 0, 4 },
  1111.     { 0, 1, 2, 3, 8, 9, 10, 11 },
  1112.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
  1113.     8*16
  1114. };
  1115.  
  1116.  
  1117. static struct GfxLayout pflayout =
  1118. {
  1119.     8,8,
  1120.     RGN_FRAC(1,2),
  1121.     4,
  1122.     { 0, 4, RGN_FRAC(1,2)+0, RGN_FRAC(1,2)+4 },
  1123.     { 0, 1, 2, 3, 8, 9, 10, 11 },
  1124.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
  1125.     8*16
  1126. };
  1127.  
  1128.  
  1129. static struct GfxLayout molayout =
  1130. {
  1131.     16,16,
  1132.     RGN_FRAC(1,2),
  1133.     4,
  1134.     { 0, 4, RGN_FRAC(1,2)+0, RGN_FRAC(1,2)+4 },
  1135.     { 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27 },
  1136.     { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, 8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
  1137.     8*64
  1138. };
  1139.  
  1140.  
  1141. static struct GfxDecodeInfo gfxdecodeinfo[] =
  1142. {
  1143.     { REGION_GFX1, 0, &pflayout, 128, 8 },
  1144.     { REGION_GFX2, 0, &molayout,   0, 4 },
  1145.     { REGION_GFX3, 0, &anlayout,  64, 8 },
  1146.     { -1 } /* end of array */
  1147. };
  1148.  
  1149.  
  1150.  
  1151. /*************************************
  1152.  *
  1153.  *    Sound definitions
  1154.  *
  1155.  *************************************/
  1156.  
  1157. static struct YM2151interface ym2151_interface =
  1158. {
  1159.     1,
  1160.     ATARI_CLOCK_14MHz/4,
  1161.     { YM3012_VOL(80,MIXER_PAN_LEFT,80,MIXER_PAN_RIGHT) },
  1162.     { 0 }
  1163. };
  1164.  
  1165.  
  1166. static struct POKEYinterface pokey_interface =
  1167. {
  1168.     2,
  1169.     ATARI_CLOCK_14MHz/8,
  1170.     { MIXER(60,MIXER_PAN_LEFT), MIXER(60,MIXER_PAN_RIGHT) },
  1171.     /* The 8 pot handlers */
  1172.     { 0, 0 },
  1173.     { 0, 0 },
  1174.     { 0, 0 },
  1175.     { 0, 0 },
  1176.     { 0, 0 },
  1177.     { 0, 0 },
  1178.     { 0, 0 },
  1179.     { 0, 0 },
  1180.     /* The allpot handler */
  1181.     { input_port_11_r, input_port_12_r },    /* dip switches */
  1182. };
  1183.  
  1184.  
  1185. static struct TMS5220interface tms5220_interface =
  1186. {
  1187.     ATARI_CLOCK_20MHz/4/4/2,
  1188.     100,
  1189.     0
  1190. };
  1191.  
  1192.  
  1193.  
  1194. /*************************************
  1195.  *
  1196.  *    Machine driver
  1197.  *
  1198.  *************************************/
  1199.  
  1200. static struct MachineDriver machine_driver_paperboy =
  1201. {
  1202.     /* basic machine hardware */
  1203.     {
  1204.         {
  1205.             CPU_T11,
  1206.             ATARI_CLOCK_20MHz/2,
  1207.             main_readmem,main_writemem,0,0,
  1208.             vblank_interrupt,1
  1209.         },
  1210.         {
  1211.             CPU_M6502,
  1212.             ATARI_CLOCK_14MHz/8,
  1213.             sound_readmem,sound_writemem,0,0,
  1214.             0,0,
  1215.             atarigen_6502_irq_gen,(UINT32)(1000000000.0/((double)ATARI_CLOCK_20MHz/2/16/16/16/10))
  1216.         },
  1217.     },
  1218.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,
  1219.     1,
  1220.     init_machine,
  1221.  
  1222.     /* video hardware */
  1223.     64*8, 48*8, { 0*8, 64*8-1, 0*8, 48*8-1 },
  1224.     gfxdecodeinfo,
  1225.     256,256,
  1226.     0,
  1227.  
  1228.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK,
  1229.     0,
  1230.     atarisys2_vh_start,
  1231.     atarisys2_vh_stop,
  1232.     atarisys2_vh_screenrefresh,
  1233.  
  1234.     /* sound hardware */
  1235.     SOUND_SUPPORTS_STEREO,0,0,0,
  1236.     {
  1237.         {
  1238.             SOUND_YM2151,
  1239.             &ym2151_interface
  1240.         },
  1241.         {
  1242.             SOUND_POKEY,
  1243.             &pokey_interface
  1244.         },
  1245.         {
  1246.             SOUND_TMS5220,
  1247.             &tms5220_interface
  1248.         }
  1249.     },
  1250.  
  1251.     atarigen_nvram_handler
  1252. };
  1253.  
  1254.  
  1255. static struct MachineDriver machine_driver_a720 =
  1256. {
  1257.     /* basic machine hardware */
  1258.     {
  1259.         {
  1260.             CPU_T11,
  1261.             ATARI_CLOCK_20MHz/2,
  1262.             main_readmem,main_writemem,0,0,
  1263.             vblank_interrupt,1
  1264.         },
  1265.         {
  1266.             CPU_M6502,
  1267.             2000000,    /* artifically high to prevent deadlock at startup ATARI_CLOCK_14MHz/8,*/
  1268.             sound_readmem,sound_writemem,0,0,
  1269.             0,0,
  1270.             atarigen_6502_irq_gen,(UINT32)(1000000000.0/((double)ATARI_CLOCK_20MHz/2/16/16/16/10))
  1271.         },
  1272.     },
  1273.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,
  1274.     1,
  1275.     init_machine,
  1276.  
  1277.     /* video hardware */
  1278.     64*8, 48*8, { 0*8, 64*8-1, 0*8, 48*8-1 },
  1279.     gfxdecodeinfo,
  1280.     256,256,
  1281.     0,
  1282.  
  1283.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK,
  1284.     0,
  1285.     atarisys2_vh_start,
  1286.     atarisys2_vh_stop,
  1287.     atarisys2_vh_screenrefresh,
  1288.  
  1289.     /* sound hardware */
  1290.     SOUND_SUPPORTS_STEREO,0,0,0,
  1291.     {
  1292.         {
  1293.             SOUND_YM2151,
  1294.             &ym2151_interface
  1295.         },
  1296.         {
  1297.             SOUND_POKEY,
  1298.             &pokey_interface
  1299.         },
  1300.         {
  1301.             SOUND_TMS5220,
  1302.             &tms5220_interface
  1303.         }
  1304.     },
  1305.  
  1306.     atarigen_nvram_handler
  1307. };
  1308.  
  1309.  
  1310. static struct MachineDriver machine_driver_sprint =
  1311. {
  1312.     /* basic machine hardware */
  1313.     {
  1314.         {
  1315.             CPU_T11,
  1316.             ATARI_CLOCK_20MHz/2,
  1317.             main_readmem,main_writemem,0,0,
  1318.             vblank_interrupt,1
  1319.         },
  1320.         {
  1321.             CPU_M6502,
  1322.             ATARI_CLOCK_14MHz/8,
  1323.             sound_readmem,sound_writemem,0,0,
  1324.             0,0,
  1325.             atarigen_6502_irq_gen,(UINT32)(1000000000.0/((double)ATARI_CLOCK_20MHz/2/16/16/16/10))
  1326.         },
  1327.     },
  1328.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,
  1329.     1,
  1330.     init_machine,
  1331.  
  1332.     /* video hardware */
  1333.     64*8, 48*8, { 0*8, 64*8-1, 0*8, 48*8-1 },
  1334.     gfxdecodeinfo,
  1335.     256,256,
  1336.     0,
  1337.  
  1338.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK | VIDEO_SUPPORTS_DIRTY,
  1339.     0,
  1340.     atarisys2_vh_start,
  1341.     atarisys2_vh_stop,
  1342.     atarisys2_vh_screenrefresh,
  1343.  
  1344.     /* sound hardware */
  1345.     SOUND_SUPPORTS_STEREO,0,0,0,
  1346.     {
  1347.         {
  1348.             SOUND_YM2151,
  1349.             &ym2151_interface
  1350.         },
  1351.         {
  1352.             SOUND_POKEY,
  1353.             &pokey_interface
  1354.         }
  1355.     },
  1356.  
  1357.     atarigen_nvram_handler
  1358. };
  1359.  
  1360.  
  1361.  
  1362. /*************************************
  1363.  *
  1364.  *    ROM decoding
  1365.  *
  1366.  *************************************/
  1367.  
  1368. static void rom_decode(void)
  1369. {
  1370.     int i;
  1371.  
  1372.     /* invert the bits of the sprites */
  1373.     for (i = 0; i < memory_region_length(REGION_GFX2); i++)
  1374.         memory_region(REGION_GFX2)[i] ^= 0xff;
  1375. }
  1376.  
  1377.  
  1378.  
  1379. /*************************************
  1380.  *
  1381.  *    Driver initialization
  1382.  *
  1383.  *************************************/
  1384.  
  1385. static void init_paperboy(void)
  1386. {
  1387.     static const UINT16 compressed_default_eeprom[] =
  1388.     {
  1389.         0x0000,0x4300,0x0113,0x0124,0x0150,0x0153,0x0154,0x0100,
  1390.         0x0112,0x01C0,0x0155,0x0143,0x0148,0x0100,0x0112,0x015C,
  1391.         0x0154,0x014F,0x0149,0x0100,0x0111,0x01F8,0x0120,0x0152,
  1392.         0x0153,0x0100,0x0111,0x0149,0x0159,0x0145,0x0120,0x0100,
  1393.         0x0111,0x0130,0x014F,0x0120,0x0154,0x0100,0x0110,0x01CC,
  1394.         0x0155,0x014F,0x0141,0x0100,0x0110,0x0168,0x0152,0x014E,
  1395.         0x0142,0x0100,0x0110,0x0104,0x0120,0x0154,0x014C,0x0100,
  1396.         0x010F,0x01A0,0x0120,0x014F,0x0145,0x0100,0x0126,0x01AC,
  1397.         0x0150,0x0149,0x0147,0x0100,0x0126,0x0148,0x0141,0x0153,
  1398.         0x0152,0x0100,0x0125,0x01E4,0x0150,0x0120,0x0145,0x0100,
  1399.         0x0125,0x0180,0x0145,0x0154,0x0141,0x0100,0x0125,0x011C,
  1400.         0x0152,0x0148,0x0154,0x0100,0x0124,0x01B8,0x0120,0x0245,
  1401.         0x0100,0x0124,0x0154,0x0142,0x0120,0x0153,0x0100,0x0123,
  1402.         0x01F0,0x014F,0x0120,0x0154,0x0100,0x0123,0x018C,0x0159,
  1403.         0x0220,0x0100,0x0123,0x0128,0x0320,0x0100,0x013A,0x0134,
  1404.         0x0144,0x0141,0x0154,0x0100,0x0139,0x01D0,0x0154,0x0148,
  1405.         0x0145,0x0100,0x0139,0x016C,0x0142,0x014F,0x0159,0x0100,
  1406.         0x0139,0x0108,0x0142,0x0146,0x0120,0x0100,0x0138,0x01A4,
  1407.         0x014D,0x0145,0x0143,0x0100,0x0138,0x0140,0x0143,0x014A,
  1408.         0x0120,0x0100,0x0137,0x01DC,0x014A,0x0145,0x0153,0x0100,
  1409.         0x0137,0x0178,0x0150,0x0143,0x0154,0x0100,0x0137,0x0114,
  1410.         0x014D,0x0241,0x0100,0x0136,0x01B0,0x0142,0x0141,0x0146,
  1411.         0x0101,0x0400,0x010F,0x017F,0x012A,0x017F,0x013D,0x010F,
  1412.         0x017F,0x012A,0x017F,0x013C,0x010F,0x017F,0x012A,0x017F,
  1413.         0x013B,0xFF00,0xFF00,0xFF00,0xFF00,0xFF00,0xFF00,0xFC00,
  1414.         0x0000
  1415.     };
  1416.     int i;
  1417.  
  1418.     /* expand the 16k program ROMs into full 64k chunks */
  1419.     for (i = 0x10000; i < 0x90000; i += 0x20000)
  1420.     {
  1421.         memcpy(&memory_region(REGION_CPU1)[i + 0x08000], &memory_region(REGION_CPU1)[i], 0x8000);
  1422.         memcpy(&memory_region(REGION_CPU1)[i + 0x10000], &memory_region(REGION_CPU1)[i], 0x8000);
  1423.         memcpy(&memory_region(REGION_CPU1)[i + 0x18000], &memory_region(REGION_CPU1)[i], 0x8000);
  1424.     }
  1425.  
  1426.     atarigen_eeprom_default = compressed_default_eeprom;
  1427.     slapstic_init(105);
  1428.  
  1429.     pedal_count = 0;
  1430.     has_tms5220 = 1;
  1431.  
  1432.     /* speed up the 6502 */
  1433.     atarigen_init_6502_speedup(1, 0x410f, 0x4127);
  1434.  
  1435.     /* display messages */
  1436.     atarigen_show_sound_message();
  1437.  
  1438.     rom_decode();
  1439. }
  1440.  
  1441.  
  1442. static void init_a720(void)
  1443. {
  1444.     atarigen_eeprom_default = NULL;
  1445.     slapstic_init(107);
  1446.  
  1447.     pedal_count = -1;
  1448.     has_tms5220 = 1;
  1449.  
  1450.     /* speed up the 6502 */
  1451.     atarigen_init_6502_speedup(1, 0x410f, 0x4127);
  1452.  
  1453.     /* display messages */
  1454.     atarigen_show_sound_message();
  1455.  
  1456.     rom_decode();
  1457. }
  1458.  
  1459.  
  1460. static void init_ssprint(void)
  1461. {
  1462.     static const UINT16 compressed_default_eeprom[] =
  1463.     {
  1464.         0x0000,0x01FF,0x0E00,0x01FF,0x0100,0x0120,0x0100,0x0120,
  1465.         0x0300,0x0120,0x0500,0x0120,0x01FF,0x0100,0x0140,0x0100,
  1466.         0x0140,0x0110,0x0100,0x0110,0x0150,0x0100,0x0110,0x0300,
  1467.         0x0140,0x01FF,0x0100,0x0160,0x0100,0x0160,0x0300,0x0160,
  1468.         0x0500,0x0160,0x01FF,0x0100,0x0180,0x0100,0x0180,0x0300,
  1469.         0x0180,0x0500,0x0180,0x01FF,0x0100,0x01A0,0x0100,0x01A0,
  1470.         0x0300,0x01A0,0x0500,0x01A0,0x01FF,0x0100,0x01C0,0x0100,
  1471.         0x01C0,0x0300,0x01C0,0x0500,0x01C0,0xFFFF,0x1EFF,0x0103,
  1472.         0x01E8,0x0146,0x01D6,0x0103,0x01DE,0x0128,0x01B3,0x0103,
  1473.         0x01D4,0x0144,0x0123,0x0103,0x01CA,0x011C,0x010B,0x0103,
  1474.         0x01C0,0x0159,0x01BF,0x0103,0x01B6,0x0129,0x019F,0x0103,
  1475.         0x01AC,0x014A,0x01C2,0x0103,0x01A2,0x010E,0x01DF,0x0103,
  1476.         0x0198,0x0131,0x01BF,0x0103,0x018E,0x010D,0x0106,0x0103,
  1477.         0x0184,0x010E,0x0186,0x0103,0x017A,0x0124,0x010C,0x0103,
  1478.         0x0170,0x014A,0x0148,0x0103,0x0166,0x0151,0x01F2,0x0103,
  1479.         0x015C,0x013E,0x013F,0x0103,0x0152,0x0111,0x0106,0x0103,
  1480.         0x0148,0x0145,0x01B1,0x0103,0x013E,0x017E,0x0164,0x0103,
  1481.         0x0134,0x017F,0x01E0,0x0103,0x012A,0x017F,0x01F3,0x0103,
  1482.         0x0120,0x017F,0x01FF,0x0103,0x0116,0x012A,0x01D6,0x0103,
  1483.         0x010C,0x0125,0x0176,0x0103,0x0102,0x014C,0x0161,0x0102,
  1484.         0x01F8,0x0128,0x0101,0x0102,0x01EE,0x0101,0x0153,0x0102,
  1485.         0x01E4,0x0109,0x0132,0x0102,0x01DA,0x012C,0x0132,0x0102,
  1486.         0x01D0,0x0125,0x0186,0x0102,0x01C6,0x011D,0x011F,0xFF00,
  1487.         0xFF00,0xFF00,0xFF00,0xFF00,0xFF00,0x0800,0x0000
  1488.     };
  1489.     int i;
  1490.  
  1491.     /* expand the 32k program ROMs into full 64k chunks */
  1492.     for (i = 0x10000; i < 0x90000; i += 0x20000)
  1493.         memcpy(&memory_region(REGION_CPU1)[i + 0x10000], &memory_region(REGION_CPU1)[i], 0x10000);
  1494.  
  1495.     atarigen_eeprom_default = compressed_default_eeprom;
  1496.     slapstic_init(108);
  1497.  
  1498.     pedal_count = 3;
  1499.     has_tms5220 = 0;
  1500.  
  1501.     /* speed up the 6502 */
  1502.     atarigen_init_6502_speedup(1, 0x8107, 0x811f);
  1503.  
  1504.     /* display messages */
  1505.     atarigen_show_sound_message();
  1506.  
  1507.     rom_decode();
  1508. }
  1509.  
  1510.  
  1511. static void init_csprint(void)
  1512. {
  1513.     static const UINT16 compressed_default_eeprom[] =
  1514.     {
  1515.         0x0000,0x01FF,0x0E00,0x0128,0x01D0,0x0127,0x0100,0x0120,
  1516.         0x0300,0x01F7,0x01D0,0x0107,0x0300,0x0120,0x010F,0x01F0,
  1517.         0x0140,0x0100,0x0140,0x0110,0x0100,0x0110,0x01A0,0x01F0,
  1518.         0x0110,0x0300,0x0140,0x01FF,0x0100,0x0160,0x0100,0x0160,
  1519.         0x0300,0x0160,0x0500,0x0160,0x01FF,0x0100,0x0180,0x0100,
  1520.         0x0180,0x0300,0x0180,0x0500,0x0180,0x01FF,0x0100,0x01A0,
  1521.         0x0100,0x01A0,0x0300,0x01A0,0x0500,0x01A0,0x01FF,0x0100,
  1522.         0x01C0,0x0100,0x01C0,0x0300,0x01C0,0x0500,0x01C0,0xFFFF,
  1523.         0x0100,0x0127,0x0110,0x0146,0x01D6,0x0100,0x0126,0x01AC,
  1524.         0x0128,0x01B3,0x0100,0x0126,0x0148,0x0144,0x0123,0x0100,
  1525.         0x0125,0x01E4,0x011C,0x010B,0x0100,0x0125,0x0180,0x0159,
  1526.         0x01BF,0x0100,0x0125,0x011C,0x0129,0x019F,0x0100,0x0124,
  1527.         0x0168,0x014A,0x01C2,0x0100,0x0124,0x0154,0x010E,0x01DF,
  1528.         0x0100,0x0123,0x01F0,0x0131,0x01BF,0x0100,0x0123,0x018C,
  1529.         0x010D,0x0106,0x0100,0x0123,0x0128,0x010E,0x0186,0x0100,
  1530.         0x0122,0x01C4,0x0124,0x010C,0x0100,0x0122,0x0160,0x014A,
  1531.         0x0148,0x0100,0x0121,0x01FC,0x0151,0x01F2,0x0100,0x0121,
  1532.         0x0198,0x013E,0x013F,0x0100,0x0121,0x0134,0x0111,0x0106,
  1533.         0x0100,0x0120,0x01D0,0x0145,0x01B1,0x0100,0x0120,0x016C,
  1534.         0x017E,0x0164,0x0100,0x0120,0x0108,0x017F,0x01E0,0x0100,
  1535.         0x011F,0x01A4,0x017F,0x01F3,0x0100,0x011F,0x0140,0x017F,
  1536.         0x01FF,0x0100,0x011E,0x01DC,0x012A,0x01D6,0x0100,0x011E,
  1537.         0x0178,0x0125,0x0176,0x0100,0x011E,0x0114,0x014C,0x0161,
  1538.         0x0100,0x011D,0x01B0,0x0128,0x0101,0x0100,0x011D,0x014C,
  1539.         0x0101,0x0153,0x0100,0x011C,0x01E8,0x0109,0x0132,0x0100,
  1540.         0x011C,0x0184,0x012C,0x0132,0x0100,0x011C,0x0120,0x0125,
  1541.         0x0186,0x0100,0x011B,0x01BC,0x011D,0x011F,0x0000
  1542.     };
  1543.     int i;
  1544.  
  1545.     /* expand the 32k program ROMs into full 64k chunks */
  1546.     for (i = 0x10000; i < 0x90000; i += 0x20000)
  1547.         memcpy(&memory_region(REGION_CPU1)[i + 0x10000], &memory_region(REGION_CPU1)[i], 0x10000);
  1548.  
  1549.     atarigen_eeprom_default = compressed_default_eeprom;
  1550.     slapstic_init(109);
  1551.  
  1552.     pedal_count = 2;
  1553.     has_tms5220 = 0;
  1554.  
  1555.     /* speed up the 6502 */
  1556.     atarigen_init_6502_speedup(1, 0x8107, 0x811f);
  1557.  
  1558.     /* display messages */
  1559.     atarigen_show_sound_message();
  1560.  
  1561.     rom_decode();
  1562. }
  1563.  
  1564.  
  1565. static void init_apb(void)
  1566. {
  1567.     atarigen_eeprom_default = NULL;
  1568.     slapstic_init(110);
  1569.  
  1570.     pedal_count = 2;
  1571.     has_tms5220 = 1;
  1572.  
  1573.     /* speed up the 6502 */
  1574.     atarigen_init_6502_speedup(1, 0x410f, 0x4127);
  1575.  
  1576.     /* display messages */
  1577.     atarigen_show_sound_message();
  1578.  
  1579.     rom_decode();
  1580. }
  1581.  
  1582.  
  1583.  
  1584. /*************************************
  1585.  *
  1586.  *    ROM definition(s)
  1587.  *
  1588.  *************************************/
  1589.  
  1590. ROM_START( paperboy )
  1591.     ROM_REGION( 0x90000, REGION_CPU1 )    /* 9*64k for T11 code */
  1592.     ROM_LOAD_ODD ( "cpu_l07.bin",  0x08000, 0x04000, 0x4024bb9b )
  1593.     ROM_LOAD_EVEN( "cpu_n07.bin",  0x08000, 0x04000, 0x0260901a )
  1594.     ROM_LOAD_ODD ( "cpu_f06.bin",  0x10000, 0x04000, 0x3fea86ac )
  1595.     ROM_LOAD_EVEN( "cpu_n06.bin",  0x10000, 0x04000, 0x711b17ba )
  1596.     ROM_LOAD_ODD ( "cpu_j06.bin",  0x30000, 0x04000, 0xa754b12d )
  1597.     ROM_LOAD_EVEN( "cpu_p06.bin",  0x30000, 0x04000, 0x89a1ff9c )
  1598.     ROM_LOAD_ODD ( "cpu_k06.bin",  0x50000, 0x04000, 0x290bb034 )
  1599.     ROM_LOAD_EVEN( "cpu_r06.bin",  0x50000, 0x04000, 0x826993de )
  1600.     ROM_LOAD_ODD ( "cpu_l06.bin",  0x70000, 0x04000, 0x8a754466 )
  1601.     ROM_LOAD_EVEN( "cpu_s06.bin",  0x70000, 0x04000, 0x224209f9 )
  1602.  
  1603.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for 6502 code */
  1604.     ROM_LOAD( "cpu_a02.bin",  0x04000, 0x04000, 0x4a759092 )
  1605.     ROM_LOAD( "cpu_b02.bin",  0x08000, 0x04000, 0xe4e7a8b9 )
  1606.     ROM_LOAD( "cpu_c02.bin",  0x0c000, 0x04000, 0xd44c2aa2 )
  1607.  
  1608.     ROM_REGION( 0x20000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1609.     ROM_LOAD( "vid_a06.bin",  0x000000, 0x08000, 0xb32ffddf )     /* playfield, planes 0/1 */
  1610.     ROM_LOAD( "vid_b06.bin",  0x00c000, 0x04000, 0x301b849d )
  1611.     ROM_LOAD( "vid_c06.bin",  0x010000, 0x08000, 0x7bb59d68 )     /* playfield, planes 2/3 */
  1612.     ROM_LOAD( "vid_d06.bin",  0x01c000, 0x04000, 0x1a1d4ba8 )
  1613.  
  1614.     ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1615.     ROM_LOAD( "vid_l06.bin",  0x000000, 0x08000, 0x067ef202 )    /* motion objects, planes 0/1 */
  1616.     ROM_LOAD( "vid_k06.bin",  0x008000, 0x08000, 0x76b977c4 )
  1617.     ROM_LOAD( "vid_j06.bin",  0x010000, 0x08000, 0x2a3cc8d0 )
  1618.     ROM_LOAD( "vid_h06.bin",  0x018000, 0x08000, 0x6763a321 )
  1619.     ROM_LOAD( "vid_s06.bin",  0x020000, 0x08000, 0x0a321b7b )    /* motion objects, planes 2/3 */
  1620.     ROM_LOAD( "vid_p06.bin",  0x028000, 0x08000, 0x5bd089ee )
  1621.     ROM_LOAD( "vid_n06.bin",  0x030000, 0x08000, 0xc34a517d )
  1622.     ROM_LOAD( "vid_m06.bin",  0x038000, 0x08000, 0xdf723956 )
  1623.  
  1624.     ROM_REGION( 0x2000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1625.     ROM_LOAD( "vid_t06.bin",  0x000000, 0x02000, 0x60d7aebb )    /* alphanumerics */
  1626. ROM_END
  1627.  
  1628.  
  1629. ROM_START( 720 )
  1630.     ROM_REGION( 0x90000, REGION_CPU1 )     /* 9 * 64k T11 code */
  1631.     ROM_LOAD_ODD ( "3126.rom",     0x08000, 0x04000, 0x43abd367 )
  1632.     ROM_LOAD_EVEN( "3127.rom",     0x08000, 0x04000, 0x772e1e5b )
  1633.     ROM_LOAD_ODD ( "3128.rom",     0x10000, 0x10000, 0xbf6f425b )
  1634.     ROM_LOAD_EVEN( "4131.rom",     0x10000, 0x10000, 0x2ea8a20f )
  1635.     ROM_LOAD_ODD ( "1129.rom",     0x30000, 0x10000, 0xeabf0b01 )
  1636.     ROM_LOAD_EVEN( "1132.rom",     0x30000, 0x10000, 0xa24f333e )
  1637.     ROM_LOAD_ODD ( "1130.rom",     0x50000, 0x10000, 0x93fba845 )
  1638.     ROM_LOAD_EVEN( "1133.rom",     0x50000, 0x10000, 0x53c177be )
  1639.  
  1640.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for 6502 code */
  1641.     ROM_LOAD( "1134.rom",     0x04000, 0x04000, 0x09a418c2 )
  1642.     ROM_LOAD( "1135.rom",     0x08000, 0x04000, 0xb1f157d0 )
  1643.     ROM_LOAD( "1136.rom",     0x0c000, 0x04000, 0xdad40e6d )
  1644.  
  1645.     ROM_REGION( 0x40000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1646.     ROM_LOAD( "1121.rom",     0x000000, 0x08000, 0x7adb5f9a )     /* playfield, planes 0/1 */
  1647.     ROM_LOAD( "1122.rom",     0x008000, 0x08000, 0x41b60141 )
  1648.     ROM_LOAD( "1123.rom",     0x010000, 0x08000, 0x501881d5 )
  1649.     ROM_LOAD( "1124.rom",     0x018000, 0x08000, 0x096f2574 )
  1650.     ROM_LOAD( "1117.rom",     0x020000, 0x08000, 0x5a55f149 )     /* playfield, planes 2/3 */
  1651.     ROM_LOAD( "1118.rom",     0x028000, 0x08000, 0x9bb2429e )
  1652.     ROM_LOAD( "1119.rom",     0x030000, 0x08000, 0x8f7b20e5 )
  1653.     ROM_LOAD( "1120.rom",     0x038000, 0x08000, 0x46af6d35 )
  1654.  
  1655.     ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1656.     ROM_LOAD( "1109.rom",     0x020000, 0x08000, 0x0a46b693 )    /* motion objects, planes 0/1 */
  1657.     ROM_CONTINUE(             0x000000, 0x08000 )
  1658.     ROM_LOAD( "1110.rom",     0x028000, 0x08000, 0x457d7e38 )
  1659.     ROM_CONTINUE(             0x008000, 0x08000 )
  1660.     ROM_LOAD( "1111.rom",     0x030000, 0x08000, 0xffad0a5b )
  1661.     ROM_CONTINUE(             0x010000, 0x08000 )
  1662.     ROM_LOAD( "1112.rom",     0x038000, 0x08000, 0x06664580 )
  1663.     ROM_CONTINUE(             0x018000, 0x08000 )
  1664.     ROM_LOAD( "1113.rom",     0x060000, 0x08000, 0x7445dc0f )
  1665.     ROM_CONTINUE(             0x040000, 0x08000 )
  1666.     ROM_LOAD( "1114.rom",     0x068000, 0x08000, 0x23eaceb0 )
  1667.     ROM_CONTINUE(             0x048000, 0x08000 )
  1668.     ROM_LOAD( "1115.rom",     0x070000, 0x08000, 0x0cc8de53 )
  1669.     ROM_CONTINUE(             0x050000, 0x08000 )
  1670.     ROM_LOAD( "1116.rom",     0x078000, 0x08000, 0x2d8f1369 )
  1671.     ROM_CONTINUE(             0x058000, 0x08000 )
  1672.     ROM_LOAD( "1101.rom",     0x0a0000, 0x08000, 0x2ac77b80 )    /* motion objects, planes 2/3 */
  1673.     ROM_CONTINUE(             0x080000, 0x08000 )
  1674.     ROM_LOAD( "1102.rom",     0x0a8000, 0x08000, 0xf19c3b06 )
  1675.     ROM_CONTINUE(             0x088000, 0x08000 )
  1676.     ROM_LOAD( "1103.rom",     0x0b0000, 0x08000, 0x78f9ab90 )
  1677.     ROM_CONTINUE(             0x090000, 0x08000 )
  1678.     ROM_LOAD( "1104.rom",     0x0b8000, 0x08000, 0x77ce4a7f )
  1679.     ROM_CONTINUE(             0x098000, 0x08000 )
  1680.     ROM_LOAD( "1105.rom",     0x0e0000, 0x08000, 0xbef5a025 )
  1681.     ROM_CONTINUE(             0x0c0000, 0x08000 )
  1682.     ROM_LOAD( "1106.rom",     0x0e8000, 0x08000, 0x92a159c8 )
  1683.     ROM_CONTINUE(             0x0c8000, 0x08000 )
  1684.     ROM_LOAD( "1107.rom",     0x0f0000, 0x08000, 0x0a94a3ef )
  1685.     ROM_CONTINUE(             0x0d0000, 0x08000 )
  1686.     ROM_LOAD( "1108.rom",     0x0f8000, 0x08000, 0x9815eda6 )
  1687.     ROM_CONTINUE(             0x0d8000, 0x08000 )
  1688.  
  1689.     ROM_REGION( 0x4000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1690.     ROM_LOAD( "1125.rom",     0x000000, 0x04000, 0x6b7e2328 )    /* alphanumerics */
  1691. ROM_END
  1692.  
  1693.  
  1694. ROM_START( 720b )
  1695.     ROM_REGION( 0x90000, REGION_CPU1 )     /* 9 * 64k T11 code */
  1696.     ROM_LOAD_ODD ( "2126.7l",      0x08000, 0x04000, 0xd07e731c )
  1697.     ROM_LOAD_EVEN( "2127.7n",      0x08000, 0x04000, 0x2d19116c )
  1698.     ROM_LOAD_ODD ( "2128.6f",      0x10000, 0x10000, 0xedad0bc0 )
  1699.     ROM_LOAD_EVEN( "3131.6n",      0x10000, 0x10000, 0x704dc925 )
  1700.     ROM_LOAD_ODD ( "1129.rom",     0x30000, 0x10000, 0xeabf0b01 )
  1701.     ROM_LOAD_EVEN( "1132.rom",     0x30000, 0x10000, 0xa24f333e )
  1702.     ROM_LOAD_ODD ( "1130.rom",     0x50000, 0x10000, 0x93fba845 )
  1703.     ROM_LOAD_EVEN( "1133.rom",     0x50000, 0x10000, 0x53c177be )
  1704.  
  1705.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for 6502 code */
  1706.     ROM_LOAD( "1134.rom",     0x04000, 0x04000, 0x09a418c2 )
  1707.     ROM_LOAD( "1135.rom",     0x08000, 0x04000, 0xb1f157d0 )
  1708.     ROM_LOAD( "1136.rom",     0x0c000, 0x04000, 0xdad40e6d )
  1709.  
  1710.     ROM_REGION( 0x40000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1711.     ROM_LOAD( "1121.rom",     0x000000, 0x08000, 0x7adb5f9a )     /* playfield, planes 0/1 */
  1712.     ROM_LOAD( "1122.rom",     0x008000, 0x08000, 0x41b60141 )
  1713.     ROM_LOAD( "1123.rom",     0x010000, 0x08000, 0x501881d5 )
  1714.     ROM_LOAD( "1124.rom",     0x018000, 0x08000, 0x096f2574 )
  1715.     ROM_LOAD( "1117.rom",     0x020000, 0x08000, 0x5a55f149 )     /* playfield, planes 2/3 */
  1716.     ROM_LOAD( "1118.rom",     0x028000, 0x08000, 0x9bb2429e )
  1717.     ROM_LOAD( "1119.rom",     0x030000, 0x08000, 0x8f7b20e5 )
  1718.     ROM_LOAD( "1120.rom",     0x038000, 0x08000, 0x46af6d35 )
  1719.  
  1720.     ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1721.     ROM_LOAD( "1109.rom",     0x020000, 0x08000, 0x0a46b693 )    /* motion objects, planes 0/1 */
  1722.     ROM_CONTINUE(             0x000000, 0x08000 )
  1723.     ROM_LOAD( "1110.rom",     0x028000, 0x08000, 0x457d7e38 )
  1724.     ROM_CONTINUE(             0x008000, 0x08000 )
  1725.     ROM_LOAD( "1111.rom",     0x030000, 0x08000, 0xffad0a5b )
  1726.     ROM_CONTINUE(             0x010000, 0x08000 )
  1727.     ROM_LOAD( "1112.rom",     0x038000, 0x08000, 0x06664580 )
  1728.     ROM_CONTINUE(             0x018000, 0x08000 )
  1729.     ROM_LOAD( "1113.rom",     0x060000, 0x08000, 0x7445dc0f )
  1730.     ROM_CONTINUE(             0x040000, 0x08000 )
  1731.     ROM_LOAD( "1114.rom",     0x068000, 0x08000, 0x23eaceb0 )
  1732.     ROM_CONTINUE(             0x048000, 0x08000 )
  1733.     ROM_LOAD( "1115.rom",     0x070000, 0x08000, 0x0cc8de53 )
  1734.     ROM_CONTINUE(             0x050000, 0x08000 )
  1735.     ROM_LOAD( "1116.rom",     0x078000, 0x08000, 0x2d8f1369 )
  1736.     ROM_CONTINUE(             0x058000, 0x08000 )
  1737.     ROM_LOAD( "1101.rom",     0x0a0000, 0x08000, 0x2ac77b80 )    /* motion objects, planes 2/3 */
  1738.     ROM_CONTINUE(             0x080000, 0x08000 )
  1739.     ROM_LOAD( "1102.rom",     0x0a8000, 0x08000, 0xf19c3b06 )
  1740.     ROM_CONTINUE(             0x088000, 0x08000 )
  1741.     ROM_LOAD( "1103.rom",     0x0b0000, 0x08000, 0x78f9ab90 )
  1742.     ROM_CONTINUE(             0x090000, 0x08000 )
  1743.     ROM_LOAD( "1104.rom",     0x0b8000, 0x08000, 0x77ce4a7f )
  1744.     ROM_CONTINUE(             0x098000, 0x08000 )
  1745.     ROM_LOAD( "1105.rom",     0x0e0000, 0x08000, 0xbef5a025 )
  1746.     ROM_CONTINUE(             0x0c0000, 0x08000 )
  1747.     ROM_LOAD( "1106.rom",     0x0e8000, 0x08000, 0x92a159c8 )
  1748.     ROM_CONTINUE(             0x0c8000, 0x08000 )
  1749.     ROM_LOAD( "1107.rom",     0x0f0000, 0x08000, 0x0a94a3ef )
  1750.     ROM_CONTINUE(             0x0d0000, 0x08000 )
  1751.     ROM_LOAD( "1108.rom",     0x0f8000, 0x08000, 0x9815eda6 )
  1752.     ROM_CONTINUE(             0x0d8000, 0x08000 )
  1753.  
  1754.     ROM_REGION( 0x4000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1755.     ROM_LOAD( "1125.rom",     0x000000, 0x04000, 0x6b7e2328 )    /* alphanumerics */
  1756. ROM_END
  1757.  
  1758.  
  1759. ROM_START( ssprint )
  1760.     ROM_REGION( 0x90000, REGION_CPU1 )    /* 9*64k for T11 code */
  1761.     ROM_LOAD_ODD ( "136042.330",   0x08000, 0x04000, 0xee312027 )
  1762.     ROM_LOAD_EVEN( "136042.331",   0x08000, 0x04000, 0x2ef15354 )
  1763.     ROM_LOAD_ODD ( "136042.329",   0x10000, 0x08000, 0xed1d6205 )
  1764.     ROM_LOAD_EVEN( "136042.325",   0x10000, 0x08000, 0xaecaa2bf )
  1765.     ROM_LOAD_ODD ( "136042.127",   0x50000, 0x08000, 0xde6c4db9 )
  1766.     ROM_LOAD_EVEN( "136042.123",   0x50000, 0x08000, 0xaff23b5a )
  1767.     ROM_LOAD_ODD ( "136042.126",   0x70000, 0x08000, 0x92f5392c )
  1768.     ROM_LOAD_EVEN( "136042.122",   0x70000, 0x08000, 0x0381f362 )
  1769.  
  1770.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for 6502 code */
  1771.     ROM_LOAD( "136042.419",   0x08000, 0x4000, 0xb277915a )
  1772.     ROM_LOAD( "136042.420",   0x0c000, 0x4000, 0x170b2c53 )
  1773.  
  1774.     ROM_REGION( 0x80000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1775.     ROM_LOAD( "136042.105",   0x020000, 0x08000, 0x911499fe )     /* playfield, planes 0/1 */
  1776.     ROM_CONTINUE(             0x000000, 0x08000 )
  1777.     ROM_LOAD( "136042.106",   0x008000, 0x08000, 0xa39b25ed )
  1778.     ROM_LOAD( "136042.101",   0x030000, 0x08000, 0x6d015c72 )
  1779.     ROM_CONTINUE(             0x010000, 0x08000 )
  1780.     ROM_LOAD( "136042.102",   0x018000, 0x08000, 0x54e21f0a )
  1781.     ROM_LOAD( "136042.107",   0x060000, 0x08000, 0xb7ded658 )     /* playfield, planes 2/3 */
  1782.     ROM_CONTINUE(             0x040000, 0x08000 )
  1783.     ROM_LOAD( "136042.108",   0x048000, 0x08000, 0x4a804a4c )
  1784.     ROM_LOAD( "136042.104",   0x070000, 0x08000, 0x339644ed )
  1785.     ROM_CONTINUE(             0x050000, 0x08000 )
  1786.     ROM_LOAD( "136042.103",   0x058000, 0x08000, 0x64d473a8 )
  1787.  
  1788.     ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1789.     ROM_LOAD( "136042.113",   0x000000, 0x08000, 0xf869b0fc )    /* motion objects, planes 0/1 */
  1790.     ROM_LOAD( "136042.112",   0x008000, 0x08000, 0xabcbc114 )
  1791.     ROM_LOAD( "136042.110",   0x010000, 0x08000, 0x9e91e734 )
  1792.     ROM_LOAD( "136042.109",   0x018000, 0x08000, 0x3a051f36 )
  1793.     ROM_LOAD( "136042.117",   0x020000, 0x08000, 0xb15c1b90 )    /* motion objects, planes 2/3 */
  1794.     ROM_LOAD( "136042.116",   0x028000, 0x08000, 0x1dcdd5aa )
  1795.     ROM_LOAD( "136042.115",   0x030000, 0x08000, 0xfb5677d9 )
  1796.     ROM_LOAD( "136042.114",   0x038000, 0x08000, 0x35e70a8d )
  1797.  
  1798.     ROM_REGION( 0x4000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1799.     ROM_LOAD( "136042.218",   0x000000, 0x04000, 0x8e500be1 )  /* alphanumerics */
  1800. ROM_END
  1801.  
  1802.  
  1803. ROM_START( csprint )
  1804.     ROM_REGION( 0x90000, REGION_CPU1 )    /* 9*64k for T11 code */
  1805.     ROM_LOAD_ODD ( "045-2126.7l",  0x08000, 0x04000, 0x0ff83de8 )
  1806.     ROM_LOAD_EVEN( "045-1127.7mn", 0x08000, 0x04000, 0xe3e37258 )
  1807.     ROM_LOAD_ODD ( "045-1125.6f",  0x10000, 0x08000, 0x650623d2 )
  1808.     ROM_LOAD_EVEN( "045-1122.6mn", 0x10000, 0x08000, 0xca1b1cbf )
  1809.     ROM_LOAD_ODD ( "045-1124.6k",  0x50000, 0x08000, 0x47efca1f )
  1810.     ROM_LOAD_EVEN( "045-1121.6r",  0x50000, 0x08000, 0x6ca404bb )
  1811.     ROM_LOAD_ODD ( "045-1123.6l",  0x70000, 0x08000, 0x0a4d216a )
  1812.     ROM_LOAD_EVEN( "045-1120.6s",  0x70000, 0x08000, 0x103f3fde )
  1813.  
  1814.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for 6502 code */
  1815.     ROM_LOAD( "045-1118.2bc", 0x08000, 0x4000, 0xeba41b2f )
  1816.     ROM_LOAD( "045-1119.2d",  0x0c000, 0x4000, 0x9e49043a )
  1817.  
  1818.     ROM_REGION( 0x80000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1819.     ROM_LOAD( "045-1105.6a",  0x000000, 0x08000, 0x3773bfbb )     /* playfield, planes 0/1 */
  1820.     ROM_LOAD( "045-1106.6b",  0x008000, 0x08000, 0x13a24886 )
  1821.     ROM_LOAD( "045-1101.7a",  0x030000, 0x08000, 0x5a55f931 )
  1822.     ROM_CONTINUE(             0x010000, 0x08000 )
  1823.     ROM_LOAD( "045-1102.7b",  0x018000, 0x08000, 0x37548a60 )
  1824.     ROM_LOAD( "045-1107.6c",  0x040000, 0x08000, 0xe35e354e )     /* playfield, planes 2/3 */
  1825.     ROM_LOAD( "045-1108.6d",  0x048000, 0x08000, 0x361db8b7 )
  1826.     ROM_LOAD( "045-1104.7d",  0x070000, 0x08000, 0xd1f8fe7b )
  1827.     ROM_CONTINUE(             0x050000, 0x08000 )
  1828.     ROM_LOAD( "045-1103.7c",  0x058000, 0x08000, 0x8f8c9692 )
  1829.  
  1830.     ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1831.     ROM_LOAD( "045-1112.6t",  0x000000, 0x08000, 0xf869b0fc )    /* motion objects, planes 0/1 */
  1832.     ROM_LOAD( "045-1111.6s",  0x008000, 0x08000, 0xabcbc114 )
  1833.     ROM_LOAD( "045-1110.6p",  0x010000, 0x08000, 0x9e91e734 )
  1834.     ROM_LOAD( "045-1109.6n",  0x018000, 0x08000, 0x3a051f36 )
  1835.     ROM_LOAD( "045-1116.5t",  0x020000, 0x08000, 0xb15c1b90 )    /* motion objects, planes 2/3 */
  1836.     ROM_LOAD( "045-1115.5s",  0x028000, 0x08000, 0x1dcdd5aa )
  1837.     ROM_LOAD( "045-1114.5p",  0x030000, 0x08000, 0xfb5677d9 )
  1838.     ROM_LOAD( "045-1113.5n",  0x038000, 0x08000, 0x35e70a8d )
  1839.  
  1840.     ROM_REGION( 0x4000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1841.     ROM_LOAD( "045-1117.4t",  0x000000, 0x04000, 0x82da786d )  /* alphanumerics */
  1842. ROM_END
  1843.  
  1844.  
  1845. ROM_START( apb )
  1846.     ROM_REGION( 0x90000, REGION_CPU1 )     /* 9 * 64k T11 code */
  1847.     ROM_LOAD_ODD ( "2126",    0x08000, 0x04000, 0x8edf4726 )
  1848.     ROM_LOAD_EVEN( "2127",    0x08000, 0x04000, 0xe2b2aff2 )
  1849.     ROM_LOAD_ODD ( "5128",    0x10000, 0x10000, 0x4b4ff365 )
  1850.     ROM_LOAD_EVEN( "5129",    0x10000, 0x10000, 0x059ab792 )
  1851.     ROM_LOAD_ODD ( "1130",    0x30000, 0x10000, 0xf64c752e )
  1852.     ROM_LOAD_EVEN( "1131",    0x30000, 0x10000, 0x0a506e04 )
  1853.     ROM_LOAD_ODD ( "1132",    0x70000, 0x10000, 0x6d0e7a4e )
  1854.     ROM_LOAD_EVEN( "1133",    0x70000, 0x10000, 0xaf88d429 )
  1855.  
  1856.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for 6502 code */
  1857.     ROM_LOAD( "4134",         0x04000, 0x04000, 0x45e03b0e )
  1858.     ROM_LOAD( "4135",         0x08000, 0x04000, 0xb4ca24b2 )
  1859.     ROM_LOAD( "4136",         0x0c000, 0x04000, 0x11efaabf )
  1860.  
  1861.     ROM_REGION( 0x80000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1862.     ROM_LOAD( "1118",         0x000000, 0x08000, 0x93752c49 )     /* playfield, planes 0/1 */
  1863.     ROM_LOAD( "1120",         0x028000, 0x08000, 0x043086f8 )
  1864.     ROM_CONTINUE(             0x008000, 0x08000 )
  1865.     ROM_LOAD( "1122",         0x030000, 0x08000, 0x5ee79481 )
  1866.     ROM_CONTINUE(             0x010000, 0x08000 )
  1867.     ROM_LOAD( "1124",         0x038000, 0x08000, 0x27760395 )
  1868.     ROM_CONTINUE(             0x018000, 0x08000 )
  1869.     ROM_LOAD( "1117",         0x040000, 0x08000, 0xcfc3f8a3 )     /* playfield, planes 2/3 */
  1870.     ROM_LOAD( "1119",         0x068000, 0x08000, 0x68850612 )
  1871.     ROM_CONTINUE(             0x048000, 0x08000 )
  1872.     ROM_LOAD( "1121",         0x070000, 0x08000, 0xc7977062 )
  1873.     ROM_CONTINUE(             0x050000, 0x08000 )
  1874.     ROM_LOAD( "1123",         0x078000, 0x08000, 0x3c96c848 )
  1875.     ROM_CONTINUE(             0x058000, 0x08000 )
  1876.  
  1877.     ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1878.     ROM_LOAD( "1105",         0x020000, 0x08000, 0x9b78a88e )    /* motion objects, planes 0/1 */
  1879.     ROM_CONTINUE(             0x000000, 0x08000 )
  1880.     ROM_LOAD( "1106",         0x028000, 0x08000, 0x4787ff58 )
  1881.     ROM_CONTINUE(             0x008000, 0x08000 )
  1882.     ROM_LOAD( "1107",         0x030000, 0x08000, 0x0e85f2ac )
  1883.     ROM_CONTINUE(             0x010000, 0x08000 )
  1884.     ROM_LOAD( "1108",         0x038000, 0x08000, 0x70ff9308 )
  1885.     ROM_CONTINUE(             0x018000, 0x08000 )
  1886.     ROM_LOAD( "1113",         0x060000, 0x08000, 0x4a445356 )
  1887.     ROM_CONTINUE(             0x040000, 0x08000 )
  1888.     ROM_LOAD( "1114",         0x068000, 0x08000, 0xb9b27f3c )
  1889.     ROM_CONTINUE(             0x048000, 0x08000 )
  1890.     ROM_LOAD( "1115",         0x070000, 0x08000, 0xa7671dd8 )
  1891.     ROM_CONTINUE(             0x050000, 0x08000 )
  1892.     ROM_LOAD( "1116",         0x078000, 0x08000, 0x879fc7de )
  1893.     ROM_CONTINUE(             0x058000, 0x08000 )
  1894.     ROM_LOAD( "1101",         0x0a0000, 0x08000, 0x0ef13513 )    /* motion objects, planes 2/3 */
  1895.     ROM_CONTINUE(             0x080000, 0x08000 )
  1896.     ROM_LOAD( "1102",         0x0a8000, 0x08000, 0x401e06fd )
  1897.     ROM_CONTINUE(             0x088000, 0x08000 )
  1898.     ROM_LOAD( "1103",         0x0b0000, 0x08000, 0x50d820e8 )
  1899.     ROM_CONTINUE(             0x090000, 0x08000 )
  1900.     ROM_LOAD( "1104",         0x0b8000, 0x08000, 0x912d878f )
  1901.     ROM_CONTINUE(             0x098000, 0x08000 )
  1902.     ROM_LOAD( "1109",         0x0e0000, 0x08000, 0x6716a408 )
  1903.     ROM_CONTINUE(             0x0c0000, 0x08000 )
  1904.     ROM_LOAD( "1110",         0x0e8000, 0x08000, 0x7e184981 )
  1905.     ROM_CONTINUE(             0x0c8000, 0x08000 )
  1906.     ROM_LOAD( "1111",         0x0f0000, 0x08000, 0x353a14fd )
  1907.     ROM_CONTINUE(             0x0d0000, 0x08000 )
  1908.     ROM_LOAD( "1112",         0x0f8000, 0x08000, 0x3af7c50f )
  1909.     ROM_CONTINUE(             0x0d8000, 0x08000 )
  1910.  
  1911.     ROM_REGION( 0x4000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1912.     ROM_LOAD( "1125",         0x000000, 0x04000, 0x05a0341c )    /* alphanumerics */
  1913. ROM_END
  1914.  
  1915.  
  1916. ROM_START( apb2 )
  1917.     ROM_REGION( 0x90000, REGION_CPU1 )     /* 9 * 64k T11 code */
  1918.     ROM_LOAD_ODD ( "2126",         0x08000, 0x04000, 0x8edf4726 )
  1919.     ROM_LOAD_EVEN( "2127",         0x08000, 0x04000, 0xe2b2aff2 )
  1920.     ROM_LOAD_ODD ( "4128",         0x10000, 0x10000, 0x46009f6b )
  1921.     ROM_LOAD_EVEN( "4129",         0x10000, 0x10000, 0xe8ca47e2 )
  1922.     ROM_LOAD_ODD ( "1130",         0x30000, 0x10000, 0xf64c752e )
  1923.     ROM_LOAD_EVEN( "1131",         0x30000, 0x10000, 0x0a506e04 )
  1924.     ROM_LOAD_ODD ( "1132",         0x70000, 0x10000, 0x6d0e7a4e )
  1925.     ROM_LOAD_EVEN( "1133",         0x70000, 0x10000, 0xaf88d429 )
  1926.  
  1927.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for 6502 code */
  1928.     ROM_LOAD( "5134",         0x04000, 0x04000, 0x1c8bdeed )
  1929.     ROM_LOAD( "5135",         0x08000, 0x04000, 0xed6adb91 )
  1930.     ROM_LOAD( "5136",         0x0c000, 0x04000, 0x341f8486 )
  1931.  
  1932.     ROM_REGION( 0x080000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1933.     ROM_LOAD( "1118",         0x000000, 0x08000, 0x93752c49 )     /* playfield, planes 0/1 */
  1934.     ROM_LOAD( "1120",         0x028000, 0x08000, 0x043086f8 )
  1935.     ROM_CONTINUE(             0x008000, 0x08000 )
  1936.     ROM_LOAD( "1122",         0x030000, 0x08000, 0x5ee79481 )
  1937.     ROM_CONTINUE(             0x010000, 0x08000 )
  1938.     ROM_LOAD( "1124",         0x038000, 0x08000, 0x27760395 )
  1939.     ROM_CONTINUE(             0x018000, 0x08000 )
  1940.     ROM_LOAD( "1117",         0x040000, 0x08000, 0xcfc3f8a3 )     /* playfield, planes 2/3 */
  1941.     ROM_LOAD( "1119",         0x068000, 0x08000, 0x68850612 )
  1942.     ROM_CONTINUE(             0x048000, 0x08000 )
  1943.     ROM_LOAD( "1121",         0x070000, 0x08000, 0xc7977062 )
  1944.     ROM_CONTINUE(             0x050000, 0x08000 )
  1945.     ROM_LOAD( "1123",         0x078000, 0x08000, 0x3c96c848 )
  1946.     ROM_CONTINUE(             0x058000, 0x08000 )
  1947.  
  1948.     ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1949.     ROM_LOAD( "1105",         0x020000, 0x08000, 0x9b78a88e )    /* motion objects, planes 0/1 */
  1950.     ROM_CONTINUE(             0x000000, 0x08000 )
  1951.     ROM_LOAD( "1106",         0x028000, 0x08000, 0x4787ff58 )
  1952.     ROM_CONTINUE(             0x008000, 0x08000 )
  1953.     ROM_LOAD( "1107",         0x030000, 0x08000, 0x0e85f2ac )
  1954.     ROM_CONTINUE(             0x010000, 0x08000 )
  1955.     ROM_LOAD( "1108",         0x038000, 0x08000, 0x70ff9308 )
  1956.     ROM_CONTINUE(             0x018000, 0x08000 )
  1957.     ROM_LOAD( "1113",         0x060000, 0x08000, 0x4a445356 )
  1958.     ROM_CONTINUE(             0x040000, 0x08000 )
  1959.     ROM_LOAD( "1114",         0x068000, 0x08000, 0xb9b27f3c )
  1960.     ROM_CONTINUE(             0x048000, 0x08000 )
  1961.     ROM_LOAD( "1115",         0x070000, 0x08000, 0xa7671dd8 )
  1962.     ROM_CONTINUE(             0x050000, 0x08000 )
  1963.     ROM_LOAD( "1116",         0x078000, 0x08000, 0x879fc7de )
  1964.     ROM_CONTINUE(             0x058000, 0x08000 )
  1965.     ROM_LOAD( "1101",         0x0a0000, 0x08000, 0x0ef13513 )    /* motion objects, planes 2/3 */
  1966.     ROM_CONTINUE(             0x080000, 0x08000 )
  1967.     ROM_LOAD( "1102",         0x0a8000, 0x08000, 0x401e06fd )
  1968.     ROM_CONTINUE(             0x088000, 0x08000 )
  1969.     ROM_LOAD( "1103",         0x0b0000, 0x08000, 0x50d820e8 )
  1970.     ROM_CONTINUE(             0x090000, 0x08000 )
  1971.     ROM_LOAD( "1104",         0x0b8000, 0x08000, 0x912d878f )
  1972.     ROM_CONTINUE(             0x098000, 0x08000 )
  1973.     ROM_LOAD( "1109",         0x0e0000, 0x08000, 0x6716a408 )
  1974.     ROM_CONTINUE(             0x0c0000, 0x08000 )
  1975.     ROM_LOAD( "1110",         0x0e8000, 0x08000, 0x7e184981 )
  1976.     ROM_CONTINUE(             0x0c8000, 0x08000 )
  1977.     ROM_LOAD( "1111",         0x0f0000, 0x08000, 0x353a14fd )
  1978.     ROM_CONTINUE(             0x0d0000, 0x08000 )
  1979.     ROM_LOAD( "1112",         0x0f8000, 0x08000, 0x3af7c50f )
  1980.     ROM_CONTINUE(             0x0d8000, 0x08000 )
  1981.  
  1982.     ROM_REGION( 0x4000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1983.     ROM_LOAD( "1125",         0x000000, 0x04000, 0x05a0341c )    /* alphanumerics */
  1984. ROM_END
  1985.  
  1986.  
  1987.  
  1988. /*************************************
  1989.  *
  1990.  *    Game driver(s)
  1991.  *
  1992.  *************************************/
  1993.  
  1994. GAME( 1984, paperboy, 0,   paperboy, paperboy, paperboy, ROT0,   "Atari Games", "Paperboy" )
  1995. GAME( 1986, 720,      0,   a720,     720,      a720,     ROT0,   "Atari Games", "720 Degrees (set 1)" )
  1996. GAME( 1986, 720b,     720, a720,     720,      a720,     ROT0,   "Atari Games", "720 Degrees (set 2)" )
  1997. GAME( 1986, ssprint,  0,   sprint,   ssprint,  ssprint,  ROT0,   "Atari Games", "Super Sprint" )
  1998. GAME( 1986, csprint,  0,   sprint,   csprint,  csprint,  ROT0,   "Atari Games", "Championship Sprint" )
  1999. GAME( 1987, apb,      0,   paperboy, apb,      apb,      ROT270, "Atari Games", "APB - All Points Bulletin (set 1)" )
  2000. GAME( 1987, apb2,     apb, paperboy, apb,      apb,      ROT270, "Atari Games", "APB - All Points Bulletin (set 2)" )
  2001.